Build a blog with Areto Node.js framework


NoSQL MongoDB is used as the main database. No need to pre-create the table and close integration with JavaScript format is a strong advantage of MongoDB as a rapid application development tool.

In the future it means that the database is available on your system at the address below. Details of installing and running MongoDB can be found on the official website.


Add the connection component in the application config and set the address of the database, as well as the name and login / password. Many application components depend on the database, so the connection section include at the top of the config, just after the logger.


module.exports = {
  components: {
    'connection': {
      schema: 'mongodb',
      settings: {
        host: 'localhost',
        port: 27017,
        database: 'areto-basic',
        options: {
          bufferMaxEntries: 0,
          keepAlive: true,
          useNewUrlParser: true

Restart the server, and if the connection is successful, you will see this message in the logs:

info: Connection is opened: mongodb://localhost:27017/areto-blog