option base with serve multiple directories doesn't work
franck-serot opened this issue · 1 comments
Hi,
I try to use the option base with serve multiple directories in order to start my web server from the source code directory augment of a directory in which some javascript files are generated.
For example, my project tree is :
./build/scripts/app.js - a file generated
./src/client/index.html - entry port of application with an import of the file 'scripts/app.js'
./src/client/scripts/*/.js - several javascript files
This is my grunt-contrib-connect configuration :
connect : {
options : {
port : '3000',
livereload : 35729,
hostname : 'localhost'
},
dev : {
options : {
open : true,
debug : true,
base : [
'build',
'src/client'
]
}
},
},
I expect the file index.html could import the file ./build/scripts/app.js but it can't be download from browser.
Could you please confirm or infirm that the use case is possible ?
If it's possible, could you help me to understand where is the problem and found a solution ?
Thank you.
Best regards,
Franck
Hi,
I found the solution of my problem.
My Express server is bad configured.
I had thefollowing configuration and it's OK.
app.use(express.static(path.join(config.root, '.build')));
Best regards,
Franck