Skip to content

bootstrap-loader is used to boot an express application : set properties, define middlewares, intialize routes, db connections, ...

License

Notifications You must be signed in to change notification settings

enneite/express-bootloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bootstrap-loader

.

bootstrap-loader is an node.js module used to boot an express application :

Set application properties and db connections ...

WARNING : v0.2.0 isn't comptabible with 0.1.*

The boot-loader module need to read one configuration files (json format) :

  • bootloader.json (general configuration)

Installation

You can install it with npm :

npm install express-bootloader --save

Or you can registrer it in the package.json of your express web application

example

By default create the configuration files in a directory named "/configs"

  • bootloader.json :
{
    "bootloader" :{
    	"db" : {
	        "mongodb" : {
	            "uri" : "mongodb://localhost/test"
	        }
	    },
		"settings" : {
			"port" : 3000,
			"views" : "views",
			"view engine" : "ejs"
		}
    }    
}
  • app.js :

// [...]

var bootloader = require('express-bootloader');

var app = express();

bootloader.init(app,__dirname);

// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));

// [...]

About

bootstrap-loader is used to boot an express application : set properties, define middlewares, intialize routes, db connections, ...

Resources

License

Stars

Watchers

Forks

Packages

No packages published