mirror of
https://github.com/20kaushik02/express-sequelize-backend-template.git
synced 2025-12-06 07:04:06 +00:00
Folder structure, READMEs
This commit is contained in:
parent
92f121e60c
commit
1f0b049cb7
@ -2,5 +2,5 @@ require("dotenv-flow").config();
|
|||||||
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"config": path.resolve("config", "config.js")
|
"config": path.resolve("config", "sequelize.js")
|
||||||
};
|
};
|
||||||
1
boilerplates/README.md
Normal file
1
boilerplates/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Boilerplates - reusable code templates
|
||||||
1
config/README.md
Normal file
1
config/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Configuration files and data
|
||||||
1
controllers/README.md
Normal file
1
controllers/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Controllers - business logic functions, end of the API route
|
||||||
1
middleware/README.md
Normal file
1
middleware/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Middleware - functionalities that must be in the middle of the API route control flow
|
||||||
1
migrations/README.md
Normal file
1
migrations/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Database (mainly Sequelize's) migrations
|
||||||
1
models/README.md
Normal file
1
models/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Database ORM (mainly Sequelize's) models
|
||||||
@ -5,7 +5,7 @@ const Sequelize = require("sequelize");
|
|||||||
|
|
||||||
const basename = path.basename(__filename);
|
const basename = path.basename(__filename);
|
||||||
const env = process.env.NODE_ENV || "development";
|
const env = process.env.NODE_ENV || "development";
|
||||||
const config = require(__dirname + "/../config/config.js")[env];
|
const config = require(__dirname + "/../config/sequelize.js")[env];
|
||||||
const db = {};
|
const db = {};
|
||||||
|
|
||||||
// Create new Sequelize instance
|
// Create new Sequelize instance
|
||||||
|
|||||||
1
routes/README.md
Normal file
1
routes/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Routes - define control flow of the API route
|
||||||
1
seeders/README.md
Normal file
1
seeders/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Database (mainly Sequelize's) seeders - initial data feed, for dummy data and testing
|
||||||
1
utils/README.md
Normal file
1
utils/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## General, reusable functionalities unrelated to API
|
||||||
1
validators/README.md
Normal file
1
validators/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
## Validators - middleware functions for request object validation
|
||||||
Loading…
x
Reference in New Issue
Block a user