An PostgreSQL + Node/Express + EJS example you can add, update and delete user data.
Below listed things you need to have in your system to run this code
- Node.js & NPM
- PostgreSQL
-
Clone or download this repository
-
OK, so i am assuming that you already have prerequisites mentioned above and also know how to use psql from command line ๐ค, if you are new and don't know much about PostgreSQL than follow link below. If you don't like command line that much than you can totally use pgAdmin.
-
Creting Database
CREATE DATABASE userdb;
-
Now that db is created follw below steps to setup
cd Getting-Started-with-PostgreSQL-and-Node
npm install
node db/db_setup.js
(this will setup basic table and add some dummy data to start with)npm start
โจ