Skip to content

Commit

Permalink
extract URL path
Browse files Browse the repository at this point in the history
  • Loading branch information
kripa-sindhu-007 committed Jun 24, 2024
1 parent 7b33856 commit ca07651
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ console.log("Logs from your program will appear here!");

// Uncomment this to pass the first stage
const server = net.createServer((socket) => {
if(request.startsWith('GET/')){
socket.write("HTTP/1.1 200 OK\r\n\r\n");
}
else{
socket.write("HTTP/1.1 404 NOT FOUND\r\n\r\n");
}
socket.on("close", () => {
socket.end();
});
Expand Down
2 changes: 1 addition & 1 deletion codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# These can be VERY verbose, so we suggest turning them off
# unless you really need them.
debug: false
debug: true

# Use this to change the JavaScript version used to run your code
# on Codecrafters.
Expand Down

0 comments on commit ca07651

Please sign in to comment.