react logo postgresql logo knex logo

FlyingK Truck Stops App

1. Introduction

This app is a single-page app for travellers that want to search for truck stops. View the deployed version at this link.

2. Set Up

  1. To install dependencies, run: yarn
  2. Install PostgresApp if you don't have one.
  3. To start postgres, run: psql
  4. To create database, run: create database truckstop;
  5. To connect to database, run: \c truckstop
  6. To connect your database with knex, create a .env file and set the appropriate DB_USER, DB_PASSWORD, DB_NAME, and DB_HOST local config variables
  7. To build your production mode, run: yarn build
  8. To run migrations and start your static production mode server, run: yarn start
  9. To seed data into your database, run: chmod +x runall.sh then ./runall.sh.
  10. To have the hot-reloading development server running, run: yarn hack