diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-17 10:03:55 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 66170ca8c64fa4e76f3830e4a02a11345a03093b (patch) | |
tree | d2ef070a8e3cc98badcf6492f4d7db345c157d91 /server/controllers/static.ts | |
parent | 109d893ff5353c3061af3062cf9443bcba39aafc (diff) | |
download | PeerTube-66170ca8c64fa4e76f3830e4a02a11345a03093b.tar.gz PeerTube-66170ca8c64fa4e76f3830e4a02a11345a03093b.tar.zst PeerTube-66170ca8c64fa4e76f3830e4a02a11345a03093b.zip |
Use process.env.npm_package_version
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index a6b462443..af7de562a 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { | 3 | import { |
4 | HLS_STREAMING_PLAYLIST_DIRECTORY, | 4 | HLS_STREAMING_PLAYLIST_DIRECTORY, PEERTUBE_VERSION, |
5 | ROUTE_CACHE_LIFETIME, | 5 | ROUTE_CACHE_LIFETIME, |
6 | STATIC_DOWNLOAD_PATHS, | 6 | STATIC_DOWNLOAD_PATHS, |
7 | STATIC_MAX_AGE, | 7 | STATIC_MAX_AGE, |
@@ -19,7 +19,6 @@ import { join } from 'path' | |||
19 | import { root } from '../helpers/core-utils' | 19 | import { root } from '../helpers/core-utils' |
20 | import { CONFIG } from '../initializers/config' | 20 | import { CONFIG } from '../initializers/config' |
21 | 21 | ||
22 | const packageJSON = require('../../../package.json') | ||
23 | const staticRouter = express.Router() | 22 | const staticRouter = express.Router() |
24 | 23 | ||
25 | staticRouter.use(cors()) | 24 | staticRouter.use(cors()) |
@@ -205,7 +204,7 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { | |||
205 | version: '2.0', | 204 | version: '2.0', |
206 | software: { | 205 | software: { |
207 | name: 'peertube', | 206 | name: 'peertube', |
208 | version: packageJSON.version | 207 | version: PEERTUBE_VERSION |
209 | }, | 208 | }, |
210 | protocols: [ | 209 | protocols: [ |
211 | 'activitypub' | 210 | 'activitypub' |