- Run
npm install
- Do
export PGUSER=yourusername
,export PGPASSWORD=yourpassword
,export PGDATABASE=yourdatabase
,export PGHOST=localhost
individually - Create the session table by doing
psql yourdatabase < node_modules/connect-pg-simple/table.sql
- Run
CONNECTION_URL=postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase npm start
- Visit http://localhost:3000
- Run
npm install
- Create the following table in your database:
CREATE TABLE "session" (
"sid" varchar NOT NULL COLLATE "default",
"sess" json NOT NULL,
"expire" timestamp(6) NOT NULL
)
WITH (OIDS=FALSE);
ALTER TABLE "session"
ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid") NOT DEFERRABLE INITIALLY IMMEDIATE;
- Do
set PGUSER=yourusername
,set PGPASSWORD=yourpassword
,set PGDATABASE=yourdatabase
,set PGHOST=localhost
individually - Do
SET CONNECTION_URL=postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase
- Run
npm start
- Visit http://localhost:3000
- Ensure that the table has been created
- in PSQL, enter the following code to mass insert into table
\copy <table_name> from '<directory_path>\<file_name>.csv' with csv header;
- Using Node.js v12.2.0