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_URLURL to a running Mongo instance which includes user and passwordOS_API_USERAGENTan Open Subtitles User-Agent key. Defaults to a testing keyTemporaryUserAgentBYPASS_MONGOif set to"true", will drop the database on each request, to get fresh data from external APIS. Use with caution.UMS_API_PRIVATE_KEY_LOCATIONandUMS_API_PUBLIC_KEY_LOCATIONoptional 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, which uses PM2 for process management. TypeScript files are compiled in memory on application start.
Our OpenSubtitles API module uses xmlrpc to transform XML requests before they hit that module, so one way to see the raw request and response bodies is to edit that library locally.
Add the following code in ./node_modules/xmlrpc/lib/client.js after this line.
console.log('OpenSubtitles request body', xml);
console.log('OpenSubtitles response body', body.join(''));