The required Node.js and Yarn versions are listed in the package.json
file.
You can run nvm use
and yvm use
from the project root if you have Node version manager and Yarn version managers installed to select the correct version.
MONGO_URL
URL to a running Mongo instance which includes user and passwordBYPASS_MONGO
if set to"true"
, will drop the database on each request, to get fresh data from external APIS. Use with caution.UMS_API_PRIVATE_KEY_LOCATION
andUMS_API_PUBLIC_KEY_LOCATION
optional absolute locations of SSL keys for HTTPS
Watches for changes to TypeScript files and compiles them to JavaScript (use yarn run build
to do it manually)
Runs the development server and restarts it when any file is changed
Runs the cron job feature using ts-node
Runs the server
Runs the test suite
Starts the API and cron job in production mode. TypeScript files are compiled in memory on application start.
To view the production logs:
- Run
sudo sh -c "du -ch /var/lib/docker/containers/*/*-json.log"
to print the list of logs. Look for the biggest one and copy the container ID. - Run
docker logs -f --tail 100 CONTAINER_ID
If the production server is unstable, it could be because the Docker cache is filling the hard drive. To fix it, run docker system prune -a
to clear unused stuff.