GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(test): only save new primus.js in dev · angular-fullstack/generator-angular-fullstack@483dda0

This repository was archived by the owner on Jul 29, 2026. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • templates/app/server/config
    • websockets(ws).js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎templates/app/server/config/websockets(ws).js‎

Copy file name to clipboardExpand all lines: templates/app/server/config/websockets(ws).js
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.