Skip to content

Commit 49c3543

Browse files
authored
Merge pull request #37 from cloudflare/kenton/missing-await
Add missing await in node.js example code
2 parents 8976088 + cf8f64d commit 49c3543

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ httpServer = http.createServer(async (request, response) => {
551551
// Accept Cap'n Web requests at `/api`.
552552
if (request.url === "/api") {
553553
try {
554-
nodeHttpBatchRpcResponse(request, response, new MyApiImpl(), {
554+
await nodeHttpBatchRpcResponse(request, response, new MyApiImpl(), {
555555
// If you are accepting WebSockets, then you might as well accept cross-origin HTTP, since
556556
// WebSockets always permit cross-origin request anyway. But, see security considerations
557557
// for further discussion.

0 commit comments

Comments
 (0)