Skip to content

wabdavaloper/testTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test task

How to start project

Connection object to database in /db/db.js

const pool = new Pool({
  user: "postgres",
  host: "localhost",
  database: "DB",
  password: "root",
  port: 5432
})

Create table Users

CREATE TABLE Users(
  uid uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
  email CHARACTER VARYING(100) NOT NULL UNIQUE,
  password CHARACTER VARYING(100) NOT NULL UNIQUE,
  nickname CHARACTER VARYING(30) NOT NULL UNIQUE
);

Create Table Tag

CREATE TABLE Tag(
  id SERIAL PRIMARY KEY,
  creator uuid,
  name CHARACTER VARYING(40),
  sortOrder INT DEFAULT 0,
  FOREIGN KEY (creator) REFERENCES Users(uid)
);

Install dependencies and start project on port 1337

npm install
node app.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published