Skip to content

kbelltree/odin-mini-message-board

Repository files navigation

The Odin Project: Mini Message Board

(Phase 1)
This Mini Message Board project was developed to strengthen my skills in Express and EJS.

For more details on the project assignment, please visit The Odin Project - Mini Message Board.

(Phase 2)
This phase focuses on refactoring the project to implement a PostgreSQL database using node-postgres (pg) in order to deepen my understanding of working with relational databases in a Node.

For more details on the project assignment, plese visit The Odin Project - Assignment 3.

Key Project Instructions

The project was developed following these main guidelines:

Phase 1:

  • Install Express and EJS.
  • Prepare two routes - / for index page, /new for the new message form page.
  • Add sample messages data in the index route file.
  • Render the messages data in the index EJS template using iteration.
  • Create a message form with:
    • Heading
    • Two input fields: one for the author’s name and one for the message text
    • Submit button
  • Configure the /new route to handle form submissions using router.post() and an HTML POST request.
  • Set up the application flow for form submission:
    1. Submit the form
    2. Decode the form data using express.urlencoded()
    3. Push the submitted data to the messages array
    4. Redirect to the index page
    5. Display the new message on the index page
  • Add an Open button next to each message that links to a detailed view of the selected message.

Phase 2:

  • Persist messages across visits by integrating PostgreSQL using a PaaS database service.
  • Create a messages table and optionally occupy it with sample data using node-postgres (pg).
  • Refactor Phase 1 route handlers to interact directly with the PostgreSQL database instead of temporary in-memory data.

Built With

  • HTML
  • CSS
  • JavaScript
  • Express
  • EJS
  • Dotenv
  • pg
  • ESLint
  • Prettier

About

The Odin Project: Mini Message Board (Express, EJS, PostgreSQL)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors