Better Rail's notification server provides real-time updates on ride progress, keeping passengers informed every step of the way.
To follow these steps, ensure that your environment is configured to run Node.js applications
Note: Requires NodeJS 16 or above, a redis server to store active rides and mongodb to store logs
- Fork the repo and clone to your machine.
- Run
yarn install
- Rename
.env.example
to.env
, and fill it as required on Enviroment Variables - Run the app with
yarn dev
/data
: stations, redis and env configurations/locales
: language files for notifications/logs
: logger and lognames sit here/requests
: requests to the rail api sit here/rides
: notification scheduler/routes
: express router/tests
: all the tests are here/types
: all the types are here/utils
: utility functions used across the server
TZ
: should always be "Asia/Jerusalem"NODE_ENV
:production
ortest
, used to determine notifications scheduler logicPORT
: port express listens toREDIS_URL
: connection string for redisMONGO_URL
: connection string for mongodbRAIL_URL
: url of the rail apiAPPLE_BUNDLE_ID
: bundle id of the iOS app to send notifications toAPPLE_TEAM_ID
: team id for the developer account associated with the iOS appAPPLE_KEY_ID
: apple notifications key idAPPLE_KEY_CONTENT
: apple notifications key content, replace new lines with\n
APN_ENV
: apple notifications server enviroment, can beproduction
ortest
FIREBASE_ADMIN_AUTH
: service account json for firebase project