File tree 1 file changed +4
-4
lines changed
app/templates/server/config
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,18 @@ module.exports = function(app) {
42
42
store : new mongoStore ( { mongoose_connection : mongoose . connection } )
43
43
} ) ) ;
44
44
< % } % >
45
+ app . set ( 'appPath' , path . join ( config . root , 'client' ) ) ;
46
+
45
47
if ( 'production' === env ) {
46
48
app . use ( favicon ( path . join ( config . root , 'client' , 'favicon.ico' ) ) ) ;
47
- app . use ( express . static ( path . join ( config . root , 'client' ) ) ) ;
48
- app . set ( 'appPath' , config . root + '/client' ) ;
49
+ app . use ( express . static ( app . get ( 'appPath' ) ) ) ;
49
50
app . use ( morgan ( 'dev' ) ) ;
50
51
}
51
52
52
53
if ( 'development' === env || 'test' === env ) {
53
54
app . use ( require ( 'connect-livereload' ) ( ) ) ;
54
55
app . use ( express . static ( path . join ( config . root , '.tmp' ) ) ) ;
55
- app . use ( express . static ( path . join ( config . root , 'client' ) ) ) ;
56
- app . set ( 'appPath' , 'client' ) ;
56
+ app . use ( express . static ( app . get ( 'appPath' ) ) ) ;
57
57
app . use ( morgan ( 'dev' ) ) ;
58
58
app . use ( errorHandler ( ) ) ; // Error handler - has to be last
59
59
}
You can’t perform that action at this time.
0 commit comments