Skip to content

A bunch of best practices and structured code for maintenable and clean nodejs application

Notifications You must be signed in to change notification settings

ltphen/nodejs-modular-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read Me

Installation

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

Folder Structure

.
+-- node_modules
|   +-- *
+-- app
|   +-- cli
|   +-- generic
|   +-- main
|   +-- modules
|   +-- others
|   +-- routing	
+-- config
|   +-- config.js
+-- log
|   +-- *
+--  public
|   +-- *
+-- test
+-- api.js

api.js

the api entry point . Bootstrap application routes

test

Folder for application unit test (optional). to test :

npm test

public

public folder for uploaded files

config

The main application configuration folder

config.js

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

}

}

app

The application logic

App folder ( API )

cli api
generic folder
main folder
modules folder
others folder
routing folder

About

A bunch of best practices and structured code for maintenable and clean nodejs application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published