Welcome to Blogin, a simple CRUD blog application built with Node.js, Express, PostgreSQL, and EJS.
Follow these steps to set up and run the application on your local machine.
Run the following command in your terminal to install the required packages:
npm installMake sure PostgreSQL is installed on your machine. You’ll need the following information to connect to your database:
- DB_USER (your PostgreSQL username)
- DB_PASSWORD (your PostgreSQL password)
- DB_HOST (usually
localhost) - DB_NAME (the name of your database)
- DB_PORT (default is
5432)
Create a .env file in the root of your project and add your PostgreSQL details:
DB_USER=your_username
DB_PASSWORD=your_password
DB_HOST=localhost
DB_NAME=your_database_name
DB_PORT=5432
PORT=3000Start the server by running:
npm startThe server will run on http://localhost:3000 by default.
- Node.js
- Express
- PostgreSQL
- EJS
- Body-Parser