refactor: static path

This commit is contained in:
Matthieu Bessat 2020-08-30 14:51:05 +02:00
parent c5f08ddbd9
commit 031f78ce27
8 changed files with 20 additions and 20 deletions

View file

@ -125,9 +125,9 @@ let main = async () => {
//app.post('/api/media', MediaController.uploadRoute())
//app.delete('/api/media/:key', MediaController.delete)
const assetsPath: string = process.env.ASSETS_PATH === undefined ? './assets/development' : process.env.ASSETS_PATH
app.use(express.static(path.resolve(assetsPath)))
//const assetsPath: string = process.env.ASSETS_PATH === undefined ? './assets/development' : process.env.ASSETS_PATH
app.use('/static', express.static(path.resolve('./assets/development')))
app.get('/500', ErrorController.internalError)