SHARE
TWEET

Untitled

a guest Aug 18th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top