mirror of
https://github.com/alexgo-io/peggedassets-server.git
synced 2026-01-12 22:43:29 +08:00
* 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>
19 lines
755 B
JavaScript
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
|
|
},
|
|
},
|
|
],
|
|
}; |