Advertisement
Guest User

Untitled

a guest
Oct 10th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. const express = require('express');
  2. const auth = require('./middlewares/auth');
  3.  
  4. const app = express();
  5. const port = 3000;
  6.  
  7. app.get('/animals', auth, (req, res) => {
  8. return res.json({ data: [{ name: 'Oso' }, { name: 'Tigre' }] });
  9. });
  10.  
  11. app.listen(port, () => console.log('Server working!'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement