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

const app = require('../module');
const async = require('areto/helper/AsyncHelper');
async.series([
  cb => app.configure(process.env.NODE_ENV, cb),
  cb => app.start(cb)
], err => {
  err && console.error(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 }