Skip to content
Snippets Groups Projects
Verified Commit 7a854f52 authored by David Beniamine's avatar David Beniamine
Browse files

Serve static path www by npm dev server

parent 545fd75c
No related branches found
No related tags found
1 merge request!4Add a dev server
# docker-compose components. Append ':devserver.yml' to also run the dev server (default is prod only)
# docker-compose components replace by devserver.yml to run the dev server (default is prod) or append ':devserver.yml' to run both
COMPOSE_FILE=docker-compose.yml
# prod server host port
PORT=8080
......
......@@ -7,7 +7,9 @@ services:
restart: $DEV_RESTART
ports:
- $DEV_PORT:9000
volumes:
- ./:/opt
environment:
- CORS_ALLOWED_HOSTS
- WEBPACK_MODE=development
- HTTP_FOLDER
volumes:
- ./:/opt
......@@ -12,10 +12,17 @@ module.exports = {
devServer: {
hot: true,
watchFiles: ['src/**/*'],
static: {
static: [
{
directory: path.join(__dirname, 'public'),
watch: true
},
{
directory: path.join(__dirname, process.env.HTTP_FOLDER ? process.env.HTTP_FOLDER : 'www'),
watch: false,
publicPath: '/data'
},
],
port: 9000
},
plugins: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment