Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. const express = require('express');
  2.  
  3. const bodyParser = require('body-parser');
  4. const cookieParser = require('cookie-parser');
  5.  
  6. let app = express();
  7. app.use(cookieParser());
  8. app.use(bodyParser.urlencoded({extended: false}));
  9. app.use(bodyParser.json());
  10. app.use(bodyParser.text());
  11.  
  12. app.use(express.static('./'));
  13.  
  14. app.get('/', (req, res) => {
  15. res.end('ok');
  16. });
  17.  
  18. app.listen(8888, () => {
  19. console.log('Server stated listening port 8888');
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement