]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.ts
Upgrade multer
[github/Chocobozzz/PeerTube.git] / server.ts
index 6a7dad0cdf00b6e0ddbd191890ea5c9d2a056b2c..f04e993f676c887f41d6b219c137c95314d5239a 100644 (file)
--- a/server.ts
+++ b/server.ts
@@ -136,6 +136,7 @@ import { VideoViews } from '@server/lib/video-views'
 cli
   .option('--no-client', 'Start PeerTube without client interface')
   .option('--no-plugins', 'Start PeerTube without plugins/themes enabled')
+  .option('--benchmark-startup', 'Automatically stop server when initialized')
   .parse(process.argv)
 
 // ----------- App -----------
@@ -324,6 +325,8 @@ async function startApplication () {
     logger.info('Web server: %s', WEBSERVER.URL)
 
     Hooks.runAction('action:application.listening')
+
+    if (cliOptions['benchmarkStartup']) process.exit(0)
   })
 
   process.on('exit', () => {