delivery_system/README.md

49 lines
1.1 KiB
Markdown
Raw Normal View History

examples -
POST localhost:3000/resolve-address
{
"searchTerm": "38%20Upper%20Montagu%20Street%2C%20London%20W1H%201LJ%2C%20United%20Kingdom"
}
2023-04-24 23:22:46 +00:00
install pg MacOS -
Install Homebrew -
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Postgres -
brew install postgresql
Start Postgres -
2023-04-24 23:37:40 +00:00
brew services start postgresql
2023-04-26 10:35:39 +00:00
Postgres CLI -
psql postgres
init POSTGRES Database -
CREATE DATABASE drop_shopping;
create tables -
timeSlots -
CREATE TABLE time_slots (
id SERIAL PRIMARY KEY,
start_time TIME NOT NULL,
end_time TIME NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
holidays -
CREATE TABLE holidays (
id SERIAL PRIMARY KEY,
holiday_date DATE NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
2023-04-24 23:37:40 +00:00
knex for migration files
npx knex migrate:make create_addresses_table
npx knex migrate:latest --env development
npx knex migrate:rollback --env development