The backend of HootDat!
Clone the repository with:
git clone https://github.com/HootDat/backend.git
cd <project_name>
npm install
Start the Postgres server and create a database called hootdat
(you can change this).
First, create your .env
file from the template.
cp .env.example .env
Then, modify .env
to change configuration options. In particular, you might need to change the database username and/or password. If you used a different database name in the previous step, you also need to change the TYPEORM_DATABASE
variable here.
Start your Redis server. No configuration required.
If you don't want to install Redis, you can run this instead:
docker pull redis
docker run --name redis-server -p 6379:6379 -d redis
This, of course, assumes you have docker.
npm run start
This will let nodemon
observe file changes and automatically recompile the server as you modify the files (live reload).
You might also be interested in other npm
scripts. Take a look at package.json
.
Note: if live reload does not work, try running npm run dev
instead.