Skip to content

Commit

Permalink
[Javascript]: Add nhttp (#6232)
Browse files Browse the repository at this point in the history
* Create app.js

* Create package.json

* Update app.js

* Create config.yaml

* Update app.js

* change POST path / to /user
  • Loading branch information
herudi authored Mar 21, 2023
1 parent 77d854c commit 49de218
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions javascript/nhttp/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import nhttp from "nhttp-land";

const app = nhttp();

app.get("/", () => {
return new Response();
});

app.get("/user/:id", (rev) => {
return new Response(rev.params.id);
});

app.post("/user", () => {
return new Response();
});

app.listen(3000);
3 changes: 3 additions & 0 deletions javascript/nhttp/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
website: nhttp.deno.dev
version: 1.2
6 changes: 6 additions & 0 deletions javascript/nhttp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"nhttp-land": "~1.2.8"
},
"type": "module"
}

0 comments on commit 49de218

Please sign in to comment.