Skip to content

Commit

Permalink
使用websocket做心跳
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Mar 3, 2020
1 parent be2094e commit 51583a9
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 12 deletions.
208 changes: 207 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"got": "^10.5.2",
"morgan": "^1.9.1",
"ms": "^2.1.2",
"progress": "^2.0.3"
"progress": "^2.0.3",
"socket.io-client": "^2.3.0"
},
"devDependencies": {
"@types/bluebird": "^3.5.27",
Expand All @@ -38,6 +39,7 @@
"@types/ms": "^0.7.30",
"@types/node": "^12.6.9",
"@types/progress": "^2.0.3",
"@types/socket.io-client": "^1.4.32",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"eslint": "^6.1.0",
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ export async function bootstrap(version: string): Promise<void> {
await cluster.enable()
} catch (e) {
if (e instanceof got.HTTPError) {
console.error(e)
console.error(e.response.body)
}
console.error(e)
process.exit(1)
}
console.log(colors.rainbow(`done, serving ${files.files.length} files`))

Expand Down
Loading

0 comments on commit 51583a9

Please sign in to comment.