Skip to content

Commit 9a50890

Browse files
authored
Merge pull request #401 from DefangLabs/codex/fix-bug-in-important-code-section
Fix variable typo in nodejs-react-postgres server
2 parents 64bdfc2 + 4148305 commit 9a50890

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
deploy:
1414
resources:
1515
reservations:
16-
memory: 2GB
16+
memory: 1g
1717
depends_on:
1818
- server
1919
server:

server/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ app.get("/todos/:id", async (req, res) => {
4747

4848
res.json(todo.rows[0]);
4949
} catch (error) {
50-
console.error(err.message);
50+
console.error(error.message);
5151
}
5252
});
5353

@@ -64,7 +64,7 @@ app.put("/todos/:id", async (req, res) => {
6464

6565
res.json("Todo was updated!");
6666
} catch (error) {
67-
console.error(err.message);
67+
console.error(error.message);
6868
}
6969
});
7070

@@ -81,5 +81,5 @@ app.delete("/todos/:id", async (req, res) => {
8181
});
8282

8383
app.listen(3010, () => {
84-
console.log("server has started on port")
85-
})
84+
console.log("server has started on port 3010")
85+
})

0 commit comments

Comments
 (0)