diff --git a/package.json b/package.json index 4f3a6c9..e18e2b2 100644 --- a/package.json +++ b/package.json @@ -53,10 +53,10 @@ "test": "jest --verbose --detectOpenHandles", "test-watch": "jest --verbose --watchAll", "dev": "./node_modules/.bin/tsc --watch", - "serve": "env ASSETS_PATH=./assets/development ./node_modules/.bin/nodemon dist/app.js", + "serve": "env NODE_ENV=development ./node_modules/.bin/nodemon dist/app.js", "build": "./node_modules/.bin/tsc", "assets": "./node_modules/.bin/gulp build", - "start": "env ASSETS_PATH=./assets/production node ./dist/app.js" + "start": "env NODE_ENV=production node ./dist/app.js" }, "main": "dist/index.js", "devDependencies": { diff --git a/src/app.ts b/src/app.ts index 379f10e..93c8ad5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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) diff --git a/views/base.twig b/views/base.twig index 41ced59..8e2bfe7 100644 --- a/views/base.twig +++ b/views/base.twig @@ -8,14 +8,14 @@ Github: https://github.com/lefuturiste
- +