-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-socket.io): build socket.io into vendor.js
Changes: - Move socket.io script tag inside vendor.js build - Add `node_modules` to vendor script locations - Change socket.io path to `/socket.io-client` in serve and client - Will not serve socket.io.js when server is ran in `production` env - Add `socket.io-client` to package.json for a more consistent build
- Loading branch information
Showing
5 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ angular.module '<%= scriptAppName %>' | |
|
||
# socket.io now auto-configures its connection when we omit a connection url | ||
ioSocket = io '', | ||
'reconnection limit': 10 * 1000 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kingcody
Author
Member
|
||
# Send auth token on connection, you will need to DI the Auth service above | ||
# 'query': 'token=' + Auth.getToken() | ||
path: '/socket.io-client' | ||
|
||
socket = socketFactory ioSocket: ioSocket | ||
|
||
|
@@ -64,4 +64,4 @@ angular.module '<%= scriptAppName %>' | |
### | ||
unsyncUpdates: (modelName) -> | ||
socket.removeAllListeners modelName + ':save' | ||
socket.removeAllListeners modelName + ':remove' | ||
socket.removeAllListeners modelName + ':remove' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why do you remove the reconnection limit?