Created
September 7, 2017 20:31
-
-
Save nomanHasan/744672904cc5462bfdc04e53bd727fb5 to your computer and use it in GitHub Desktop.
Add API route to app.js
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
// Other Require statements ... | |
var index = require('./routes/index.route'); | |
var users = require('./routes/users.route'); | |
// Get the API route ... | |
var api = require('./routes/api.route') | |
// Other stuffs ... | |
//Use the Routes | |
app.use('/', index); | |
app.use('/users', users); | |
//Use the API routes for all routes matching /api | |
app.use('/api', api); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment