Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

This is the simplest possible nodejs api using the base http library that responds to any request with:
```
Yo!
Yo BRUH!
```
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

var http = require('http');
http.createServer(function (req, res) {
// const url = "https://jsonplaceholder.typicode.com/posts/1";
console.log(`Just got a request at ${req.url}!`)
res.write('Yo!');
res.end();
}).listen(process.env.PORT || 3000);

res.write("yo")
res.end();
}).listen(process.env.PORT || 3000);