Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. const express = require('express');
  2. const applyMiddleware = require('./middleware').applyMiddleware;
  3.  
  4. const app = express();
  5. applyMiddleware(app);
  6.  
  7. app.get('/items', function(req, res) {
  8. res.json({
  9. user: req.user,
  10. message: 'get call succeed!',
  11. url: req.url,
  12. });
  13. });
  14.  
  15. app.listen(3000, function() {
  16. console.log('App started');
  17. });
  18.  
  19. module.exports = app;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement