diff options
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 | ||