Skip to content

Commit 9ecc0ff

Browse files
committed
Fix node crash (server is not defined)
Probably a copy-paste error. The express server variable is called `app'.
1 parent b88fed8 commit 9ecc0ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/guestbook-node/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ client.on("error", function (err) {
4141

4242
process.on("SIGTERM", function () {
4343
client.quit();
44-
server.close(function () {
44+
app.close(function () {
4545
process.exit(0);
4646
});
4747
});

0 commit comments

Comments
 (0)