Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const auth = require('./middlewares/auth');
- const app = express();
- const port = 3000;
- app.get('/animals', auth, (req, res) => {
- return res.json({ data: [{ name: 'Oso' }, { name: 'Tigre' }] });
- });
- app.listen(port, () => console.log('Server working!'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement