Boilerplate/Starter Project for building RESTful APIs using Adonis, MySQL, JWT authentication.
Clone the repo then install dependencies :
npm installCreate .env file :
cp .env.example .envRun the following command to run startup migrations.
adonis migration:runRun the following command to start the HTTP server (dev mode).
npm run devRegister
POST /api/v1/auth/register
{email: 'youremail@gmail.com', password: 'yourpasswod'}Sign-In
POST /api/v1/auth/sign-in
{email: 'youremail@gmail.com', password: 'yourpasswod'}Refresh the token
POST /api/v1/auth/token/refresh
{refresh_token:'REFRESH_TOKEN'}Get the current user
GET /api/v1/user/me
Authorization : Bearer YOUR_TOKENLogout
POST /api/v1/auth/logout
{refresh_token:'REFRESH_TOKEN'}