File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ function logEnd() {
39
39
} , 100 ) ;
40
40
}
41
41
42
+ // Express web server
43
+ let app = express ( ) ;
44
+ app . use ( '/' , express . static ( `${ __dirname } /dev` ) ) ;
45
+ app . listen ( PORT , function ( ) {
46
+ serverStatus ( ) ;
47
+ } ) ;
48
+
42
49
// Webpack build server
43
50
let compiler = webpack ( require ( './webpack.config.js' ) ) ;
44
51
compiler . watch ( { } , function ( err , stats ) {
@@ -59,15 +66,3 @@ karmaServer.on('run_complete', function() {
59
66
logEnd ( ) ;
60
67
} ) ;
61
68
karmaServer . start ( ) ;
62
-
63
- // Express web server
64
- let app = express ( ) ;
65
-
66
- app . use ( '/dist' , express . static ( `${ __dirname } /dev/dist` ) ) ;
67
- app . get ( '/' , function ( req , res ) {
68
- res . sendFile ( `${ dirname } /dev/index.html` ) ;
69
- } ) ;
70
-
71
- app . listen ( PORT , function ( ) {
72
- serverStatus ( ) ;
73
- } ) ;
You can’t perform that action at this time.
0 commit comments