File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
templates/app/server/config Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,16 @@ export default function initWebSocketServer(server) {
4848 primus . on ( 'connection' , onConnect ) ;
4949 primus . on ( 'disconnection' , onDisconnect ) ;
5050
51- return new Promise ( ( resolve , reject ) => {
52- // Save the primus client library configured for our server settings
53- primus . save ( path . join ( __dirname , '../../client/components/socket/primus.js' ) , err => {
54- if ( err ) return reject ( err ) ;
55-
56- resolve ( primus ) ;
51+ if ( process . env . NODE_ENV === 'development' ) {
52+ return new Promise ( ( resolve , reject ) => {
53+ // Save the primus client library configured for our server settings
54+ primus . save ( path . join ( __dirname , '../../client/components/socket/primus.js' ) , err => {
55+ if ( err ) return reject ( err ) ;
56+
57+ resolve ( primus ) ;
58+ } ) ;
5759 } ) ;
58- } ) ;
60+ } else {
61+ return Promise . resolve ( ) ;
62+ }
5963}
You can’t perform that action at this time.
0 commit comments