1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 05:09:41 +02:00
This commit is contained in:
Nikita Melnikov 2022-11-03 01:02:34 +02:00
parent a180f6c649
commit eea82fee8f
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,6 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME_TEST: ${{ fromJSON('[${{github.repository}}, ${{github.repository}}-stage]')[endsWith(github.ref, '/stage')] }}
jobs:
build:

View file

@ -34,6 +34,7 @@ function createApp(): express.Express {
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cwd = process.cwd();
const app = express();
const localConfig = appConfig.frontend;
@ -85,7 +86,10 @@ function createApp(): express.Express {
app.use(express.static(path.join(__dirname, '../../public')));
if (appConfig.uploads.driver === 'local') {
app.use('/uploads', express.static(appConfig.uploads.local.path));
const uploadsPath = path.join(cwd, appConfig.uploads.local.path);
console.log(uploadsPath);
app.use('/uploads', express.static(uploadsPath));
}
app.use('/favicon', express.static(downloadedFaviconFolder));