/citibike

a website for seeing data of nyc's citibike docks

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

CitiBike Dock Data

A website to allow users to look up usage for their favorite CitiBike docks

Local Setup

(Example commands given for Ubuntu)

Database

  1. Install postgres
  2. Create a user
    1. $ sudo -u postgres psql
    2. `postgres=# CREATE USER citibike WITH PASSWORD 'citibike'
  3. Create a database and a shadow database
    1. postgres=# CREATE DATABASE 'dockdata';
    2. postgres=# CREATE DATABASE 'dockdatashadow';
  4. Set your environment variables to reference these databases in .env
    1. DATABASE_URL='postgresql://citibike:citibike@localhost/dockdata'
    2. SHADOW_DATABASE_URL='postgresql://citbike:citibike@localhost/dockdatashadow'

Development Commands

  • Start the web server
    • npm run dev
  • Start the prisma studio, allowing interactive access to the database via a web GUI
    • npx prisma studio
  • Further Prisma CLI commands can be found on their website