Ithaca Transit is a new end-to-end navigation service built for the TCAT bus service in Ithaca.
Download on the App Store here!
API Docs here.
Please ensure npm
(npm) and docker
(docker) are installed by checking npm -v
and docker -v
and that Docker is running.
It's recommended to use direnv
.
The required environment variables for this API are the following:
To use direnv
with this repository, run the following and then set the variables appropriately.
cp envrc.template .envrc
cp python.envrc.template python.envrc
Environment variable values can be found by asking a member of Cornell AppDev.
package.json
contains all necessary run, build, test, and utility scripts for the project. Type npm run
before a script name to execute. npm run
by itself shows a list of available scripts.
To run ithaca-transit-backend locally, run the following:
npm run build:dev
npm run start:microservices
npm run start:node
-
build:dev
builds node andstart:microservices
starts up its microservices. -
start:node
runs node inside a docker image; substitutestart:dev
to run on your local computer.- You can see in package.json that when you run
npm run start:node
, it actually runsdocker-compose up node
. On the other hand, the command for starting development isnpm run start:dev
; in package.json, its value tells us to actually execute some magic (./node_modules/.bin/webpack…).
- You can see in package.json that when you run
You only need to run npm run build:dev
and npm run start:microservices
once - the "volumes" part of docker-compose.yml allows for hot reloading. However, if you are building an image for production, make sure to do npm run build:dev
right before doing that. And you will always need to run start
to run node.
To stop running the microservices:
docker-compose down