Skip to content

Instantly share code, notes, and snippets.

@wgottschalk-RMS
Created May 30, 2016 16:22
Show Gist options
  • Save wgottschalk-RMS/dffc593268b61ea53679a926ed9b7510 to your computer and use it in GitHub Desktop.
Save wgottschalk-RMS/dffc593268b61ea53679a926ed9b7510 to your computer and use it in GitHub Desktop.
// medium_example_app/controllers/index_controller.js
// import your helpers/middleware/models here
export default function (router) {
router.use(/* controller specific middleware goes here */);
router.get('/', (req, res) => {
// call model methods to get JSON from db
let data = {data: 'hello world'};
res.json(data);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment