kickstarting
A very lightweight modular architecture to kickstart applications
About
An ultra lightweight way of setting up a standard application runtime environment by pulling in and initializing core dependencies in a well-defined manner without having to repeat yourself.
Why
This basic module starts out with configuration (nconf
) and logging (bunyan
).
- nconf
- bunyan
- logger instance
- startup / shutdown messages
- package info (
package.json
)
Other optional packages may supply a web server, persistence, caching, etc.
Surely quite customized to my needs but maybe serves others as a template.
Still needs a bit more documentation love, so use with care. It’s currently primarily intended for my own use.
Install
npm
Install withnpm i kickstarting --save
Usage
Usage
npm install -S https://github.com/AndreasPizsa/startup
The in your code, do
var env = uses:'app';
or more elegantly in CoffeeScript
env = require 'startup' uses:'app'
The Environment
Startup creates an "environment" which is a fancy word for a hash with useful instances of other tools.
npm install startup startup-restify startup-redis
# app.coffeeenv = require 'startup' uses:'app redis restify'## results in{ _ : # lodash-instance rootDir : '/users/you/your-project' bunyan : # bunyan log : # bunyan instance nconf : # nconf instance pkginfo : # package.json}
Config files
/config/{development|production}.json
/config/{development|production}.{json|coffe|litcoffee}
Related Projects
- kickstart-app adds
nconf
andbunyan
- kickstart-restify starts a
restify
web server - nconf
- bunyan
Issues
Please report any bugs or feature requests, thanks!
Author
Andreas Pizsa
License
Copyright (c) 2014 Andreas Pizsa, contributors.
Released under the MIT license.
This file was generated by verb-cli on October 28, 2014.