Skip to content

Commit

Permalink
add 404s to the server
Browse files Browse the repository at this point in the history
Signed-off-by: RedGuy12 <paul@reid-family.org>
  • Loading branch information
cobaltt7 committed Aug 7, 2023
1 parent 8fdaebd commit 9c011c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ http.createServer((request, response) => {
response.writeHead(200, { "Content-Type": "text/plain" }).end("Success");
});
}
} else {
response.writeHead(404, { "Content-Type": "text/plain" }).end("Not Found");
}
} catch (error) {
response.writeHead(500).end(error.name + ": " + error.message);
Expand Down

0 comments on commit 9c011c8

Please sign in to comment.