Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into task/email-service
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasCharrier authored Jan 17, 2024
2 parents 944c57b + 6948b44 commit c85b225
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/routes/staticFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import express from 'express';
import path from 'path';

const setupStaticFiles = (app) => {
app.use('/public', express.static(path.join(__dirname, './public')));
app.use('/static', express.static(path.join(__dirname, '../static')));
app.use('/public', express.static(path.join(__dirname, '.../public')));
app.use('/static', express.static(path.join(__dirname, '../../static')));
app.use(
'/datagouvfr',
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/template.data.gouv.fr/dist'
)
)
Expand All @@ -19,7 +19,7 @@ const setupStaticFiles = (app) => {
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/react-datepicker/dist/react-datepicker.css'
)
)
Expand All @@ -29,7 +29,7 @@ const setupStaticFiles = (app) => {
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/react-tabulator/lib/styles.css'
)
)
Expand All @@ -39,7 +39,7 @@ const setupStaticFiles = (app) => {
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/react-tabulator/lib/css/tabulator.min.css'
)
)
Expand All @@ -49,7 +49,7 @@ const setupStaticFiles = (app) => {
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/react-markdown-editor-lite/lib/index.css'
)
)
Expand All @@ -59,7 +59,7 @@ const setupStaticFiles = (app) => {
express.static(
path.join(
__dirname,
process.env.NODE_ENV === 'production' ? '../..' : '..',
process.env.NODE_ENV === 'production' ? '../../..' : '../..',
'node_modules/topbar/topbar.min.js'
)
)
Expand Down

0 comments on commit c85b225

Please sign in to comment.