It is possible run application without listening port? I just want to run scheduled tasks
Asked
Active
Viewed 1,684 times
0
-
This might help you: https://stackoverflow.com/questions/4018154/how-do-i-run-a-node-js-app-as-a-background-service – Stefan Mar 12 '21 at 15:52
1 Answers
2
Yes you can, Nestjs offers Standalone applications, with it you can mount a Nest application without any network listeners. to implement it, you have to edit your main.js function by :
async function bootstrap() {
const app = await NestFactory.createApplicationContext(AppModule);
// application logic...
}
bootstrap();
For more details visit Standalone applications

Youba
- 2,636
- 3
- 11
- 25