Installation

Installing AdonisJs is a relatively straightforward process and will only take a few minutes.

System Requirements

The only dependencies of the framework are Node.js and npm. Ensure that the version of those tools meets the following.

  • Node.js >= 8.0.0

  • npm >= 3.0.0

You can make use of tools like nvm to help you manage multiple version of Node.js and npm at the same time.

Installing AdonisJs

Via Adonis CLI

Adonis CLI is a command line tool to help you install AdonisJs.

> npm i -g @adonisjs/cli
You can also use npx to avoid installing the CLI globally.

Make sure to setup npm system-wide node_modules/.bin directory in your $PATH to be able to access the installed binary.

Once done, you can make use of adonis new command that will create a fresh installation of AdonisJs.

> adonis new yardstick
By default, the fullstack blueprint is cloned from Github. You can customize this by using the options --api-only or --slim. You can also specify your own blueprint by using the option --blueprint=<github-org/repo>.

Via Git

Alternatively, you can make use of git directly to fetch our boilerplates.

# Fullstack
> git clone --dissociate https://github.com/adonisjs/adonis-fullstack-app
# API
> git clone --dissociate https://github.com/adonisjs/adonis-api-app
# Slim
> git clone --dissociate https://github.com/adonisjs/adonis-slim-app

After cloning one of our boilerplate, install all dependencies by running npm install.

Serving the application

Once the installation process is completed, you can cd into the directory and run the following command to start the HTTP Server.

> adonis serve --dev

This command starts the server on the port defined inside the .env file.