Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.07 KB

README.md

File metadata and controls

50 lines (40 loc) · 1.07 KB

GuessWithMe

Installation

# Clone this repository
$ git clone https://github.com/GuessWithMe/guess-with-me

# Go into the repository
$ cd guess-with-me

# Make sure you have the latest docker up and running
$ docker-compose up

Open a new terminal, go to project root folder and start backend

$ cd api
$ yarn && yarn start

In a different terminal window start frontend

$ cd ui-react
$ yarn && yarn start

Setting up DB

  1. Open your favorite db client and create a Postgres db - name should match the environment config (guess-dev).
// api/src/config/env/development.ts
postgres: {
	database:  'guess-dev',
	...
},
  1. Open api/src/config/sequelize.ts in the editor of your choice and uncomment this line:
 // await this.client.sync({ force: true });
  1. Check in your db that tables have been created, comment it out again.

  2. Lastly, to seed the database:

$ cd api
$ yarn db:seed

Note: You can repeat steps 2-4, whenever you need to recreate database tables (for example, models have changed)