first commit

This commit is contained in:
Akhil Gupta
2021-05-29 15:20:50 +05:30
commit d25c30a7b2
194 changed files with 49873 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
const fs = require('fs')
const path = require('path')
const bodyParser = require('body-parser')
module.exports = (app) => {
app.use(bodyParser.json())
// Register all routes inside tests/mock-api/routes.
fs.readdirSync(path.join(__dirname, 'routes')).forEach((routeFileName) => {
if (/\.js$/.test(routeFileName)) {
require(`./routes/${routeFileName}`)(app)
}
})
}