Skip to content

Commit

Permalink
Step 11.1: Installing PostgreSQL Client
Browse files Browse the repository at this point in the history
Co-authored-by: killjoy2013 <killjoy_tr@yahoo.com>
  • Loading branch information
2 people authored and Urigo committed May 20, 2020
1 parent 518db0d commit 6912f37
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.8"
networks:
tortilla:
services:
postgresql:
restart: always
image: postgres:12.2-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=testpassword
- POSTGRES_DB=whatsapp
volumes:
- /var/lib/postgresql/data
networks:
- tortilla
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@types/jest": "25.2.3",
"@types/jsonwebtoken": "8.5.0",
"@types/node": "14.0.4",
"@types/pg": "7.14.3",
"jest": "26.0.1",
"jest-junit": "10.0.0",
"prettier": "2.0.5",
Expand All @@ -48,7 +49,9 @@
"graphql-import": "1.0.2",
"graphql-scalars": "1.1.2",
"graphql-tools": "5.0.0",
"jsonwebtoken": "8.5.1"
"jsonwebtoken": "8.5.1",
"pg": "8.2.1",
"sql-template-strings": "2.2.2"
},
"jest": {
"transform": {
Expand Down
2 changes: 1 addition & 1 deletion schema/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const resolvers: Resolvers = {
throw Error("req.password and req.passwordConfirm don't match");
}

if (users.some(u => u.username === username)) {
if (users.some((u) => u.username === username)) {
throw Error('username already exists');
}

Expand Down

0 comments on commit 6912f37

Please sign in to comment.