Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created December 3, 2018 04:35
Show Gist options
  • Save amandeepmittal/6fb1e5de718572b91d63d72853d2a780 to your computer and use it in GitHub Desktop.
Save amandeepmittal/6fb1e5de718572b91d63d72853d2a780 to your computer and use it in GitHub Desktop.
const todosController = require('../controllers/todos.js');
module.exports = app => {
app.get('/api', (req, res) =>
res.status(200).send({
message: 'Create Your Own Todo Lists API'
})
);
app.post('/api/todos', todosController.create);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment