To install use the following command
git clone https://github.com/ltphen/nodejs-modular-framework.git
then
npm install
To launch the server
npm start
.
+-- node_modules
| +-- *
+-- app
| +-- cli
| +-- generic
| +-- main
| +-- modules
| +-- others
| +-- routing
+-- config
| +-- config.js
+-- log
| +-- *
+-- public
| +-- *
+-- test
+-- api.js
the api entry point . Bootstrap application routes
Folder for application unit test (optional). to test :
npm test
public folder for uploaded files
The main application configuration folder
database : {
db_name : "elevage",
db_host : "localhost",
db_user : "root",
db_pass : ""
},
api : {
version: 'v1'
},
env : {
PORT : 8000,
prod : false
},
log : {
great : "localhost:8000/log/",
folders : ["common", "generic"]
},
jwt : {
secret : "PASDEPASSWORD",
expiredTime : "24h"
},
mail : {
config : {
host: 'smtp.ethereal.email',
port: 587,
auth: {
user: '[email protected]',
pass: 'GthaXwxS9WUsNbfEcK'
}
},
option : {
from: '"Fred Foo 👻" <[email protected]>', // sender addres
}
}
The application logic
cli api
generic folder
main folder
modules folder
others folder
routing folder