Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server.route({
- path: '/api/companies',
- method: 'GET',
- handler(req, reply) {
- Company.find({}, (err, companies) => {
- if (err) {
- return reply(err).code(404);
- }
- return reply.response(companies);
- })
- }
- });
Add Comment
Please, Sign In to add comment