This is a simple blog project where users can create, edit, and delete posts.
-
Create a PostgreSQL database and fill in the connection details in
./DbConfiguration.env -
Run the
createTableAndDb.sqlscript to create the necessary database and tablespsql -U your_username -d BlogDB -a -f sql/createTableAndDb.sql
Replace
"your_username"with your PostgreSQL username.
-
Install dependencies
npm install
-
Start the application
-
In development mode using
nodemonnodemon app.js
This will automatically restart the server whenever changes are made.
-
In production mode
node app.js
Visit
http://localhost:your_portin your browser, whereyour_portis the port on which your Node.js application is running. -
- Visit the homepage to view existing posts.
- Click on "Create New Post" to add a new post.
- Click on "Edit" to modify an existing post.
- Click on "Delete" to remove a post.
Feel free to explore and enhance the functionality as needed!