Skip to content

Commit

Permalink
chore: add db script
Browse files Browse the repository at this point in the history
  • Loading branch information
arturvoloshyn committed Feb 2, 2024
1 parent 9a5ed1e commit aedbf79
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# website-blocker

## To clone

- You'll need to have [git](https://git-scm.com/), [node v16+](https://nodejs.org/en/) and [docker](https://www.docker.com/) installed in
your system.

`git clone https://github.com/ArturW1998/website-blocker.git`

## Run the project

- Copy `.env.example` as `.env` inside `apps/server`

- Replace the values of the environment variables with your own in the `.env` file
- Run the database with the `npm run db:server` command

```
npm install - install dependencies
Expand Down
2 changes: 1 addition & 1 deletion apps/server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
JWT_SECRET="asdfkajsdfj"
JWT_SECRET="asdfkajsdfj"
3 changes: 2 additions & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config test/jest-e2e.json"
"test:e2e": "jest --config test/jest-e2e.json",
"db": "docker compose up db"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"start:client": "npm run start --workspace=@website-blocker/client",
"api:download:client": "npm run api:download --workspace=@website-blocker/client",
"api:generate:client": "npm run api:generate --workspace=@website-blocker/client",
"db:server": "npm run db --workspace=@website-blocker/server",
"build:server": "npm run server --workspace=@website-blocker/server",
"start:server": "npm run start --workspace=@website-blocker/server",
"start:dev:server": "npm run start:dev --workspace=@website-blocker/server",
Expand Down

0 comments on commit aedbf79

Please sign in to comment.