https://github.com/vicainelli/node-scaffold-api-adonisjs
https://github.com/vicainelli/node-scaffold-api-adonisjs
adonis adonis-framework adonisjs adonisjs-framework adonisjs5 api microservice node-api node-api-base rest-api scaffold-template
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vicainelli/node-scaffold-api-adonisjs
- Owner: vicainelli
- Created: 2020-11-17T22:31:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T19:45:38.000Z (over 3 years ago)
- Last Synced: 2024-12-28T04:47:10.272Z (5 months ago)
- Topics: adonis, adonis-framework, adonisjs, adonisjs-framework, adonisjs5, api, microservice, node-api, node-api-base, rest-api, scaffold-template
- Language: TypeScript
- Homepage:
- Size: 280 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeJS Scaffold API with AdonisJS 5
## Requirements
- Node.js >= `14.15.4`
- npm >= `6.0.0`And if you don't have a database installed, you can use the Docker container.
## Set It Up
### Install node dependencies
```
npm install
```### Create the .env file
```
cp .env.example .env
```### Create the tmp directory
> This step is necessary only to run tests
```
mkdir -p tmp
```### Add the Docker database variables
> Only if you are going to use the database from the Docker container.
```
DB_CONNECTION=mysql
MYSQL_HOST=localhost
MYSQL_PORT=3307
MYSQL_USER=adonisjs
MYSQL_PASSWORD=secret
MYSQL_DB_NAME=adonisjs
MYSQL_ALLOW_EMPTY_PASSWORD=true
```### Set up docker
```
docker-compose build && docker-compose up -d
```### Run the migrations
```
node ace migrations:run
```### Start and watch the serve
```
node ace serve --watch
```