Files
peggedassets-server/api2/ecosystem.config.js
g1nt0ki e77454eb62 migrate api server (#341)
* rewrite server

* add docker config

* update start script

* chore: Remove unused INFLUXDB_TOKEN from deployment workflow and env files

* use node v20

* fix dockerfile

* Update cache initialization to remove duplicate await keyword
Update API endpoint for fetching historical rates

* fix api2 bug

* hardcode UST to 0

* remove subpath

---------

Co-authored-by: 0xngmi <0xngmi@protonmail.com>
2024-06-10 20:11:23 +02:00

19 lines
755 B
JavaScript

// https://pm2.keymetrics.io/docs/usage/application-declaration/
module.exports = {
apps: [
{
name: 'api2-stablecoin-rest-server',
script: './api2/index.ts', // Path to your main TypeScript file
interpreter: 'node',
args: '-r ts-node/register', // Use ts-node for running TypeScript files
listen_timeout: 120_000, // Wait 120 seconds for the app to start
kill_timeout: 10_000, // Wait 10 seconds for the app to start
wait_ready: true, // Wait for the 'ready' signal
instances: 2,
exec_mode: 'cluster', // Start in cluster mode
env: {
TS_NODE_TRANSPILE_ONLY: 'true', // Enable ts-node's transpile-only mode, setting it via args is not working for some reason
},
},
],
};