Users gather points to be able to roll prizes from gacha. Crafted with NestJS and newest version of Angular.
-
Install dependencies.
-
Create
.envfrom.env.example. -
Create
mikro-orm.config.tsfrom example. -
Run
npm run docker:up. -
Run migrations & seeders.
npm run db:migration:sync npm run db:seed:dev -
Start backend & frontend.
-
How to enable HMR (Hot Module Reload) in
backend?Use
npm run start:devthat has--watchflag. If you want to use webpack HMR please note that it's not compatible withTsMorphMetadataProvider -
How can I reset database?
Execute
npm run db:resetscript followed bynpm run db:seed:dev -
How can I register another alias in
backend?You need to put it in
pathssection in tsconfig.json and then reflect it in package.json under_moduleAliases -
How do I view PostgreSQL data?
First, access PostgreSQL service by using
docker execorDocker Desktop. Afterwards refer to cheatsheet below:> psql gacha_db root \c DBNAME - switch database \dt - list tables \d TABLENAME - table schema PS: when you see `DB_NAME=# ` in terminal, you can also use SQL commands supported by PostgreSQL