this took 10 min why did I put it off for days
This commit is contained in:
3
index.js
3
index.js
@@ -11,6 +11,9 @@ const db = new Redis({
|
||||
})
|
||||
module.exports = { app, db, globalConfig } // Export database connection for other files
|
||||
|
||||
app.use(express.json()) // Allows receiving JSON bodies
|
||||
// see important note: https://expressjs.com/en/api.html#express.json
|
||||
|
||||
fs.readdir(globalConfig.routesDirectory, (err, files) => {
|
||||
if (err) {
|
||||
console.log("FATAL: Unable to read ./routes")
|
||||
|
||||
Reference in New Issue
Block a user