aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-06 15:44:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-06 16:12:17 +0200
commit9452d4fd3321148fb80b64a67bd9983fee6c208e (patch)
tree62ad9be8d3f4bfcf63196274ad4b736372c05f2c /server/lib/client-html.ts
parent630d0a1bf5897fff203cb07e426223f55dcc882d (diff)
downloadPeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.tar.gz
PeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.tar.zst
PeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.zip
/!\ Use a dedicated config file for development
It means you have to replace NODE_ENV=test to NODE_ENV=dev if you use it npm run dev:* commands are already updated
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 1e8d03023..899d80c15 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -2,6 +2,7 @@ import express from 'express'
2import { readFile } from 'fs-extra' 2import { readFile } from 'fs-extra'
3import { join } from 'path' 3import { join } from 'path'
4import validator from 'validator' 4import validator from 'validator'
5import { isTestOrDevInstance } from '@server/helpers/core-utils'
5import { toCompleteUUID } from '@server/helpers/custom-validators/misc' 6import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
6import { mdToOneLinePlainText } from '@server/helpers/markdown' 7import { mdToOneLinePlainText } from '@server/helpers/markdown'
7import { ActorImageModel } from '@server/models/actor/actor-image' 8import { ActorImageModel } from '@server/models/actor/actor-image'
@@ -30,7 +31,6 @@ import { MAccountActor, MChannelActor } from '../types/models'
30import { getActivityStreamDuration } from './activitypub/activity' 31import { getActivityStreamDuration } from './activitypub/activity'
31import { getBiggestActorImage } from './actor-image' 32import { getBiggestActorImage } from './actor-image'
32import { ServerConfigManager } from './server-config-manager' 33import { ServerConfigManager } from './server-config-manager'
33import { isTestInstance } from '@server/helpers/core-utils'
34 34
35type Tags = { 35type Tags = {
36 ogType: string 36 ogType: string
@@ -234,7 +234,7 @@ class ClientHtml {
234 const path = ClientHtml.getEmbedPath() 234 const path = ClientHtml.getEmbedPath()
235 235
236 // Disable HTML cache in dev mode because webpack can regenerate JS files 236 // Disable HTML cache in dev mode because webpack can regenerate JS files
237 if (!isTestInstance() && ClientHtml.htmlCache[path]) { 237 if (!isTestOrDevInstance() && ClientHtml.htmlCache[path]) {
238 return ClientHtml.htmlCache[path] 238 return ClientHtml.htmlCache[path]
239 } 239 }
240 240