Building a simple RESTful API using Express.js and interacting with PostgreSQL doing CRUD operations.
- Clone the repo
git clone https://github.com/Rayologist/Express-RESTful-api-with-PostgreSQL.git
- Install required packages
cd Express-RESTful-api-with-PostgreSQL && npm install
- Create database using psql
createdb todo_database
- Enter database
psql todo_database
- Create table
CREATE TABLE todo(
todo_id SERIAL PRIMARY KEY,
description VARCHAR(255)
);
- Start the project
npm start
- Use Postman to interact with the API