File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 223223 "update-webdriver" : " node node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update" ,
224224 <%_ } -%><% if(filters.mongo) { %>
225225 "start:mongo" : " docker run --rm -d -p 27017:27017 --name mongo mongo" ,<% } %>
226- "start" : " node server"
226+ "start" : " node server" ,
227+ "start:client" : " webpack-dev-server --config webpack.dev.js" ,
228+ "start:server" : " node server"
227229 },
228230 "private" : true
229231}
Original file line number Diff line number Diff line change @@ -335,6 +335,28 @@ module.exports = function makeWebpackConfig(options) {
335335 } ;
336336 }
337337
338+ /**
339+ * Dev server configuration
340+ * Reference: http://webpack.github.io/docs/configuration.html#devserver
341+ * Reference: http://webpack.github.io/docs/webpack-dev-server.html
342+ */
343+ config . devServer = {
344+ contentBase : './client/' ,
345+ hot : true ,
346+ proxy : {
347+ '/api' : 'http://localhost:<%= devPort %>' ,
348+ '/auth' : 'http://localhost:<%= devPort %>' ,
349+ '/socket.io' : 'http://localhost:<%= devPort %>' ,
350+ } ,
351+ stats : {
352+ modules : false ,
353+ cached : false ,
354+ colors : true ,
355+ chunks : false ,
356+ } ,
357+ historyApiFallback : true ,
358+ } ;
359+
338360 config . node = {
339361 global : true ,
340362 process : true ,
You can’t perform that action at this time.
0 commit comments