Build a blog with Areto Node.js framework

Startup scripts

Create a bin directory. There will be located application startup scripts.

The first and main script is the start of the web server. It contains configuration and initialization of the application.

bin/server.js

'use strict';
const app = require('../module');
app.configure(process.env.NODE_ENV, err => {
  if (err) {
    return console.error(err);
  }
  app.start(err => {});
});

Configuring the run from WebStorm

Edit configurations -> Add new -> Node.js
Name: Areto Blog
Working directory: areto-blog
Javascript file: bin/server.js
Environment variables: NODE_ENV=development

Start!

When the web server has started successfully, you will receive a message in the WebStorm console:

info blog started in development { address: '::', family: 'IPv6', port: 3000 }