aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-11-14 15:27:47 +0100
committerRigel Kent <par@rigelk.eu>2018-11-14 15:59:56 +0100
commitb83b8dd5aef03084133c5983de6f312e7d1654b8 (patch)
tree4daf0f5f10dac8b1c5704d9823b734aa1051d99a /server.ts
parentfb651cf2d426e7429a7c571ab7d93becd63ad116 (diff)
downloadPeerTube-b83b8dd5aef03084133c5983de6f312e7d1654b8.tar.gz
PeerTube-b83b8dd5aef03084133c5983de6f312e7d1654b8.tar.zst
PeerTube-b83b8dd5aef03084133c5983de6f312e7d1654b8.zip
add cli option to run without client
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index 59fb820b4..51aa67638 100644
--- a/server.ts
+++ b/server.ts
@@ -16,6 +16,7 @@ import * as cookieParser from 'cookie-parser'
16import * as helmet from 'helmet' 16import * as helmet from 'helmet'
17import * as useragent from 'useragent' 17import * as useragent from 'useragent'
18import * as anonymize from 'ip-anonymize' 18import * as anonymize from 'ip-anonymize'
19import * as cli from 'commander'
19 20
20process.title = 'peertube' 21process.title = 'peertube'
21 22
@@ -98,6 +99,10 @@ import { VideosRedundancyScheduler } from './server/lib/schedulers/videos-redund
98 99
99// ----------- Command line ----------- 100// ----------- Command line -----------
100 101
102cli
103 .option('--no-client', 'Start PeerTube without client interface')
104 .parse(process.argv)
105
101// ----------- App ----------- 106// ----------- App -----------
102 107
103// Enable CORS for develop 108// Enable CORS for develop
@@ -151,7 +156,7 @@ app.use('/', trackerRouter)
151app.use('/', staticRouter) 156app.use('/', staticRouter)
152 157
153// Client files, last valid routes! 158// Client files, last valid routes!
154app.use('/', clientsRouter) 159if (cli.client) app.use('/', clientsRouter)
155 160
156// ----------- Errors ----------- 161// ----------- Errors -----------
157 162