Overview
This module is a part of yocto node modules for NodeJS.
Please see our NPM repository for complete list of available tools (completed day after day).
This module manage init / start our node core stack based on :
This module is core module of our tools : YoctopusJs
Read this before any usage
- yocto-config readme
- yocto-express readme
- yocto-render readme
- yocto-router readme
How to use
First you need to setup a core.json
config file at process.cwd()
path.
This file must have this structure :
"config" : "YOUR_CONFIG_PATH_HERE" "env" : "development" : "logger" : "rotate" : "path" : "YOUR_LOG_PATH_HERE" "name" : "YOUR_LOG_FILE_NAME_HERE" "staging" : "logger" : "rotate" : "path" : "YOUR_LOG_PATH_HERE" "name" : "YOUR_LOG_FILE_NAME_HERE" "production" : "logger" : "rotate" : "path" : "YOUR_LOG_PATH_HERE" "name" : "YOUR_LOG_FILE_NAME_HERE"
And start your app like example below :
var logger = ;var core = ; // set debug to true if neededcoredebug = true; // Init your app firstcore;
How to add external middleware on current app
It's simple juste use an utility method for that :
// your middlewarevar {} ...// add itcore;
Yocto Stack Generator
You can also use our yeoman generator to generate an app automatically.
For this see yoctopus-generator FAQ