Server start

Open application configuration file and change component settings.

config/default.js

module.exports = {

    title: 'Blog',

    components: {
        'db': {
            settings: {
                'database': process.env.MONGO_NAME || 'evado-blog',
            }
        },
        'cookie': {
            secret: 'blog.evado'
        },
        'session': {
            secret: 'blog.evado'
        },
        ...
    },
    ...
};

Launch web server in the development mode. This mode includes detailed logging of operations and differs in configuration of application parameters and components. Overridable parameters are set in the config/development.js. Enabling server mode is specified by setting the NODE_ENV environment variable. If launch is done in Visual Studio Code, then the environment variable is set in the /blog/.vscode/launch.json file.

Example for Linux:

NODE_ENV=development node console/start

Example for Windows:

set NODE_ENV=development
node console/start

Further, setting NODE_ENV=development will be implied by default when running console scripts.

Application configuration file is selected based on the NODE_ENV value.

If parent property is specified, then configuration inherits parent data. For example, development and production inherit default configuration. If app (or module) has original (defined in constructor), then configuration is inherited from the original location.

Install and run.

node console/install
node console/start

The app will be launched at http://localhost:3000.