Created
December 11, 2020 04:26
-
-
Save tarang9211/0a9848fd470383356a4be62980bc37ef 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
/** routes/branches/index.js */ | |
module.exports = function() { | |
router.get() | |
router.post() | |
} | |
/** routes/index.js */ | |
module.exports = function() { | |
require('./branches') | |
} | |
// server.js | |
const routes = require('./routes'); | |
app.use('/api', routes) | |
/** | |
With this strucutre, trying to consume api/branches doesn't seem to hit the route. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment