aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-17 10:03:55 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit66170ca8c64fa4e76f3830e4a02a11345a03093b (patch)
treed2ef070a8e3cc98badcf6492f4d7db345c157d91 /server/controllers/static.ts
parent109d893ff5353c3061af3062cf9443bcba39aafc (diff)
downloadPeerTube-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.ts5
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 @@
1import * as cors from 'cors' 1import * as cors from 'cors'
2import * as express from 'express' 2import * as express from 'express'
3import { 3import {
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'
19import { root } from '../helpers/core-utils' 19import { root } from '../helpers/core-utils'
20import { CONFIG } from '../initializers/config' 20import { CONFIG } from '../initializers/config'
21 21
22const packageJSON = require('../../../package.json')
23const staticRouter = express.Router() 22const staticRouter = express.Router()
24 23
25staticRouter.use(cors()) 24staticRouter.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'