mlh-blog-demo

Node.js Basic Blog App with Fastify and PostgreSQL

Stars
7

Node.js Basic Blog App with Fastify and PostgreSQL

Getting Started

After cloning this repository, please do the following to get started:

  1. Install Dependencies
npm install
  1. Create a Heroku app
heroku create <unique-app-name>
  1. Create a Heroku PostgreSQL database
heroku addons:create heroku-postgresql:hobby-dev
  1. Load the database with the seed data
heroku pg:psql < database.sql
  1. Fetch the Heroku PostgreSQL database URL
heroku config --shell > .env
  1. Run the server locally
npm run dev
  1. Open the browser and go to http://localhost:3000

  2. Deploy the app to Heroku

git push heroku main
  1. Open the app on Heroku
heroku open