aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server.ts b/server.ts
index 6a7dad0cd..f04e993f6 100644
--- a/server.ts
+++ b/server.ts
@@ -136,6 +136,7 @@ import { VideoViews } from '@server/lib/video-views'
136cli 136cli
137 .option('--no-client', 'Start PeerTube without client interface') 137 .option('--no-client', 'Start PeerTube without client interface')
138 .option('--no-plugins', 'Start PeerTube without plugins/themes enabled') 138 .option('--no-plugins', 'Start PeerTube without plugins/themes enabled')
139 .option('--benchmark-startup', 'Automatically stop server when initialized')
139 .parse(process.argv) 140 .parse(process.argv)
140 141
141// ----------- App ----------- 142// ----------- App -----------
@@ -324,6 +325,8 @@ async function startApplication () {
324 logger.info('Web server: %s', WEBSERVER.URL) 325 logger.info('Web server: %s', WEBSERVER.URL)
325 326
326 Hooks.runAction('action:application.listening') 327 Hooks.runAction('action:application.listening')
328
329 if (cliOptions['benchmarkStartup']) process.exit(0)
327 }) 330 })
328 331
329 process.on('exit', () => { 332 process.on('exit', () => {