diff options
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r-- | server/controllers/client.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index aaa04889a..ce5608c9b 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -6,20 +6,21 @@ import expressValidator = require('express-validator') | |||
6 | // TODO: use .validator when express-validator typing will have validator field | 6 | // TODO: use .validator when express-validator typing will have validator field |
7 | const validator = expressValidator['validator'] | 7 | const validator = expressValidator['validator'] |
8 | 8 | ||
9 | const db = require('../initializers/database') | 9 | import { database as db } from '../initializers/database' |
10 | import { | 10 | import { |
11 | CONFIG, | 11 | CONFIG, |
12 | REMOTE_SCHEME, | 12 | REMOTE_SCHEME, |
13 | STATIC_PATHS, | 13 | STATIC_PATHS, |
14 | STATIC_MAX_AGE | 14 | STATIC_MAX_AGE |
15 | } from '../initializers' | 15 | } from '../initializers' |
16 | import { root } from '../helpers' | ||
16 | 17 | ||
17 | const clientsRouter = express.Router() | 18 | const clientsRouter = express.Router() |
18 | 19 | ||
19 | // TODO: move to constants | 20 | // TODO: move to constants |
20 | const opengraphComment = '<!-- opengraph tags -->' | 21 | const opengraphComment = '<!-- opengraph tags -->' |
21 | const distPath = join(__dirname, '..', '..', 'client/dist') | 22 | const distPath = join(root(), 'client', 'dist') |
22 | const embedPath = join(distPath, 'standalone/videos/embed.html') | 23 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
23 | const indexPath = join(distPath, 'index.html') | 24 | const indexPath = join(distPath, 'index.html') |
24 | 25 | ||
25 | // Special route that add OpenGraph tags | 26 | // Special route that add OpenGraph tags |