Steps to run this project:
- Run
npm i
command - Setup database settings inside
data-source.ts
file - Run
npm start
command
- npm run build
- npm run start
git push heroku main
- Tambahin command dan query di typeorm/seed.ts
- Run
npx ts-node typeorm/seed.ts
(npm run db:seed doesnt work dunno why)
- Tambah entity ada di folder
src/entity
- Buat heroku yang free dan pake typeorm, tambahin snippet ini di data-source.ts
ssl: true,
extra: {
ssl: {
rejectUnauthorized: false,
},
}
- Factory Factory digunakan untuk melakukan inisiasi database (seeding)