- Fork or download the repo
npm install
- Create a
.env
file similar to the.env.example
- Include your PostgreSQL username, password (if you have one for local host), database and port.
CREATE TABLE form_submissions (
id uuid,
name varchar(500),
email varchar(500),
event_category varchar(500),
event_date timestamp,
state varchar(50),
city varchar(100),
event_description varchar(1000),
created_on timestamp
);
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
INSERT INTO form_submissions VALUES (uuid_generate_v1(), 'alda', '[email protected]', 'police_brutality', CAST('2020-01-01' as timestamp), 'NY', 'NYC', 'unnecessary search of my car', NOW());
node api.js
- API local endpoint: http://localhost:8000/api.json
npm start
- App starts on: http://localhost:3000/