This is the boilerplate for creating an API server in AdonisJs.
clone the repo and then run following commands.
npm i --global @adonisjs/cli
cd lotus-api
adonis install
adonis key:generate
create an environment file .env
in the root folder of project and copy the content of .env.example
into .env
file.
Change the Database configuration in .env
file and run the following command to run startup migrations.
adonis migration:run
Run the following command to run seeder. Seeder will seed data with faker API into database.
adonis seed
adonis serve --dev
Run the following command to list all registered routes
adonis route:list
For a detailed explanation on how things work, check out guide.