Skip to content

Commit 8323bb3

Browse files
committed
updated to node v20
1 parent f1fdb12 commit 8323bb3

13 files changed

+731
-2771
lines changed

.env.template

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DB_USER=fazt
2+
DB_PASSWORD=faztpassword
3+
DB_HOST=localhost
4+
DB_DATABASE=nodepg
5+
DB_PORT=5432

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
.env

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v21.7.3

database/db.sql

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
CREATE DATABASE firstapi;
1+
-- CREATE DATABASE firstapi;
22

3-
\l
3+
-- \l
44

5-
\c firstapi;
5+
-- \c firstapi;
6+
7+
DROP TABLE IF EXISTS users;
68

79
CREATE TABLE users (
810
id SERIAL PRIMARY KEY,
911
name VARCHAR(40),
10-
email TEXT
12+
email TEXT NOT NULL UNIQUE,
13+
created_at TIMESTAMP NOT NULL DEFAULT NOW()
1114
);
1215

1316
INSERT INTO users (name, email)

docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3.8'
2+
services:
3+
db:
4+
image: postgres
5+
restart: always
6+
environment:
7+
POSTGRES_USER: fazt
8+
POSTGRES_PASSWORD: faztpassword
9+
POSTGRES_DB: nodepg
10+
ports:
11+
- 5432:5432

0 commit comments

Comments
 (0)