diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-11-14 15:27:47 +0100 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-11-14 15:59:56 +0100 |
commit | b83b8dd5aef03084133c5983de6f312e7d1654b8 (patch) | |
tree | 4daf0f5f10dac8b1c5704d9823b734aa1051d99a /server.ts | |
parent | fb651cf2d426e7429a7c571ab7d93becd63ad116 (diff) | |
download | PeerTube-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.ts | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -16,6 +16,7 @@ import * as cookieParser from 'cookie-parser' | |||
16 | import * as helmet from 'helmet' | 16 | import * as helmet from 'helmet' |
17 | import * as useragent from 'useragent' | 17 | import * as useragent from 'useragent' |
18 | import * as anonymize from 'ip-anonymize' | 18 | import * as anonymize from 'ip-anonymize' |
19 | import * as cli from 'commander' | ||
19 | 20 | ||
20 | process.title = 'peertube' | 21 | process.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 | ||
102 | cli | ||
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) | |||
151 | app.use('/', staticRouter) | 156 | app.use('/', staticRouter) |
152 | 157 | ||
153 | // Client files, last valid routes! | 158 | // Client files, last valid routes! |
154 | app.use('/', clientsRouter) | 159 | if (cli.client) app.use('/', clientsRouter) |
155 | 160 | ||
156 | // ----------- Errors ----------- | 161 | // ----------- Errors ----------- |
157 | 162 | ||