Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. const express = require('express');
  2. const app = express(),
  3. port = process.env.PORT || 3080;
  4.  
  5. app.get('/', (req,res) => {
  6. res.send('App Works !!!');
  7. });
  8.  
  9. app.get('/time', (req,res) => {
  10. res.send(new Date());
  11. });
  12.  
  13. app.listen(port, () => {
  14. console.log(`Server listening on the port::${port}`);
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement