Table of Contents

Build a Restful API with Adonis JS

Written on by Jessica Agorye

Estimated read time 5 minutes

Build a Restful API with AdonisJS

50%

💰 SAVE 50% ON VERPEX YEARLY MANAGED HOSTING PLANS FOR WORDPRESS

with the discount code

SERVERS-SALE

select the API project structure
node ace serve –watch
AdonisJs
API preview page
route handling
command to create the User controller
UsersContoller file
create routes and register UserController
node ace listroutes
RESTful resource routes
Thunder Client Extension
90%

💰 90% OFF YOUR FIRST MONTH WITH ALL VERPEX SHARED HOSTING PLANS

with the discount code

AWESOME

node ace configure @adonisjslucid
tmp file
database migrations folder
tableName = 'users'
node ace migration run
create a model
User.ts file
public username string
send a post request
GET request
Command to return the second username
50%

💰 SAVE 50% ON VERPEX YEARLY CLOUD HOSTING PLANS

with the discount code

AWESOME