Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const applyMiddleware = require('./middleware').applyMiddleware;
- const app = express();
- applyMiddleware(app);
- app.get('/items', function(req, res) {
- res.json({
- user: req.user,
- message: 'get call succeed!',
- url: req.url,
- });
- });
- app.listen(3000, function() {
- console.log('App started');
- });
- module.exports = app;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement