Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #2

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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);