This repository provides a minimal working example of seqeulize-typescript
using
- Docker-Compose
- Models
- Relations
- Migrations
- Seeders
- Create a
.env
file with the following content:
POSTGRES_PASSWORD=postgres
POSTGRES_USER=minimal
POSTGRES_DB=minimal
- Execute
docker-compose up
. The database will be created, all migrations will be run and the data will be seeded with a preset Organization and User. - Open localhost:80/api/v1
- You should see the following:
[
{
"id": 1,
"name": "Tomas",
"org_id": 1,
"createdAt": "2021-01-12T09:24:14.856Z",
"updatedAt": "2021-01-12T09:24:14.856Z",
"organization": {
"id": 1,
"name": "Firma",
"createdAt": "2021-01-12T09:24:14.825Z",
"updatedAt": "2021-01-12T09:24:14.825Z"
}
}
]