mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
better unsubscribe, startup stagger
This commit is contained in:
@@ -3,6 +3,7 @@ import { NestFactory } from '@nestjs/core';
|
||||
import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify';
|
||||
import * as bitcoinjs from 'bitcoinjs-lib';
|
||||
import { useContainer } from 'class-validator';
|
||||
import { setTimeout } from 'timers/promises';
|
||||
import * as ecc from 'tiny-secp256k1';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
@@ -20,6 +21,13 @@ async function bootstrap() {
|
||||
// };
|
||||
|
||||
//const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter({ https: httpsOptions }));
|
||||
|
||||
// stagger startup
|
||||
if (process.env.NODE_APP_INSTANCE != null) {
|
||||
await setTimeout(parseInt(process.env.NODE_APP_INSTANCE) * 5000);
|
||||
}
|
||||
|
||||
|
||||
const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter());
|
||||
app.setGlobalPrefix('api')
|
||||
app.useGlobalPipes(
|
||||
|
||||
Reference in New Issue
Block a user