- Make a free account on ElephantSQL
- Create a new instance and copy the URL code
- Paste the URL code to PG_URI in /server/connectPg.js
- In your new instance in ElephantSQL, create a usertable:
CREATE TABLE userTable ( username VARCHAR(25) NOT NULL PRIMARY KEY password VARCHAR(255) NOT NULL, CONSTRAINT username_unique UNIQUE (username) )
- And create a spicetable:
CREATE TABLE spiceTable( name VARCHAR(25) NOT NULL, remaining INT NOT NULL, containerSize VARCHAR(25) NOT NULL, assocUser VARCHAR(25) NOT NULL
) - Add an automatically incrementing unique id to spice table:
ALTER TABLE spiceTable ADD COLUMN id BIGSERIAL PRIMARY KEY