/react-express-heroku-template

Template for quickly spinning up a frontend and backend on Heroku.

Primary LanguageJavaScriptMIT LicenseMIT

React-Express-Heroku Template

Simple template for quickly spinning up a frontend and backend on Heroku. Utilizes Sequelize for Heroku Postgres interaction.

Stack

  1. React - Frontend/UI framework
  2. Express - Backend framework
  3. Sequelize - Database connection and ORM
  4. Heroku - Deployment

Usage

Use the template to start a new repository, deploy the application via Heroku, and add the Heroku Postgres addon. Once this is done, you can copy the DATABASE_URL environment variable from your Heroku env-vars to a local .env file.

The following must be added to the .env file for your development environment to work:

DATABASE_URL=<Postgres database URL>
DEVELOPMENT=True

After this, you can use the following commands:

yarn install                 #Do this in root and frontend folder before beginning development.
yarn develop                 #Starts Express backend.
cd frontend && yarn start    #Starts react app.