diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -136,6 +136,7 @@ import { VideoViews } from '@server/lib/video-views' | |||
136 | cli | 136 | cli |
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', () => { |