$ make start$ npm installCopy the .env file and name it .env.local.
This is used to override the variables set in the .env file. It is ignored by Git.
While optional, this is useful for instantiating the database with games, and overall import games.
Follow the IGDB documentation to create your account and retrieve your access id and secret.
Then, set these values in their respective variables in .env.local:
TWITCH_CLIENT_ID=YOUR_TWITCH_CLIENT_ID
TWITCH_CLIENT_SECRET=YOUR_TWITCH_CLIENT_SECRET$ npm db:create
$ npm db:update-schema
$ npm db:seed# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prodThe fake database comes with 5 accounts with the same password: yoyo
the database can be seen at http://localhost:8080/ (user: root, password: yoyo)
When updating an Entity, TypeORM will not update the database automatically, as it is unsafe to do so. We work with migrations.
for TypeORM to be aware of Entity changes, run:
$ npm run typeorm migration:generate src/migration/whateverTitleYouWantThis command will create a file with the queries necessary to synchronize the database with your Entity.
Once this file is created, run:
$ npm run typeorm migration:runThis will run the queries inside the src/migration/whateverTitleYouWantfile
and you're done!
learn more about migrations here