This is intended as a service worker that can be spun up to perform actions against the API
- Download and install the latest NodeJS
- Clone the repo
- Follow the Node Gyp setup guide
-
Install
protobuf
locally, needs to be>=3.X
- Run
npm install node-gyp -g
- Run
npm install
from the repo base directory - Run
npm run start
to start the application - Run
npm run test
to execute unit tests
All development configuration options are controlled from the config.js file, which can be overridden locally by copying and renaming the local file in /config
to local.js
. All environment variables can be ignored.
Critical non-development configurations are controlled through the system environment variables
#Environment Variables ###Required variables:
- NODE_ENV
###Optional variables:
Name | Description |
---|---|
NODE_ENV | Environment to run as, defaults to development
|
USER_EMAIL | Email of the user to login with |
USER_PASSWORD | Password of the user to login with |
LOCATION_LAT | Latitude coordinates for the location to search |
LOCATION_LON | Longitude coordinates for the location to search |
LOCATION_ALT | Altitude in meters for the location to search |
ANDROID_ID | Android ID to use when authenticating to Google Play Services |
SERVICE_ID | Service ID to use when authenticating to Google Play Services |
CLIENT_SIGNATURE | Client signature to use when authenticating to Google Play Services |
APP_NAME | App name to use when authenticating to Google Play Services |
API_URL | Initial API endpoint to hit |
USER_API_ENDPOINT | User's API endpoint to hit |
USER_TOKEN | User authentication token |
USER_TOKEN_EXPIRES |
epoch time for when the token expires |
If you provide both the USER_TOKEN
and USER_TOKEN_EXPIRES
it will skip the login flow
If you provide the USER_API_ENDPOINT
it will skip the endpoint fetch flow
Default location is a McDonald's in Solna, Stockholm