Created
May 30, 2016 16:22
-
-
Save wgottschalk-RMS/dffc593268b61ea53679a926ed9b7510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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