SHARE
TWEET

Untitled

a guest Oct 10th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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!'));
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
 
Top