https://github.com/robertolima-dev/adonis_api_rest
https://github.com/robertolima-dev/adonis_api_rest
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/robertolima-dev/adonis_api_rest
- Owner: robertolima-dev
- Created: 2020-05-21T18:15:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T10:06:24.000Z (over 1 year ago)
- Last Synced: 2024-11-20T12:01:32.711Z (over 1 year ago)
- Language: JavaScript
- Size: 682 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Adonis API application
This is the boilerplate for creating an API server in AdonisJs, it comes pre-configured with.
1. Bodyparser
2. Authentication
3. CORS
4. Lucid ORM
5. Migrations and seeds
## Setup
Use the adonis command to install the blueprint
```bash
adonis new yardstick --api-only
```
or manually clone the repo and then run `npm install`.
### Migrations
Run the following command to run startup migrations.
```js
adonis migration:run
```
### .env
HOST=127.0.0.1
PORT=3333
NODE_ENV=development
APP_NAME=AdonisJs
APP_URL=http://${HOST}:${PORT}
CACHE_VIEWS=false
APP_KEY=zYkNot7GolM1FQB6pwXcshZ21REoSTRi
DB_CONNECTION=pg
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=
DB_PASSWORD=
DB_DATABASE=adonis
HASH_DRIVER=bcrypt