This project was generated with โค by yours truely.
Adonis Js
Typescript
MySQL
I am using a module based architecture which i created customly for this project, each unit of this project is treated as module which contains a controller, service & routes. I also created a custom adonis command which is used to create the modules.
$ node ace module <name>
-
Clone repository -
$ git clone https://github.com/Fn-studyo/patronize-api.git
-
Install dependencies -
$ cd patronize-api
-
Install dependencies -
$ yarn install
-
Create a new file
.env
if it doesn't exist and copy the contents of.env.example
into it to be able to run your server on production environment.
Make sure you have mysql installed.
-
Connect to your db by providing the appropriate credentials, check .env.example for a similar example
-
Migrate the Database -
$ node ace migration:run
-
Start up the server - Run
$ node ace serve --watch
-
Server should be running on http://127.0.0.1:3333/ by default
-
Start up the server - Run
$ npm start
|$ npm run dev
-
Server should be running on http://localhost:2020/ by default
- Start up
$ npm run test
- Via Postman Collection (https://documenter.getpostman.com/view/11039127/UUxtEAr4)