]> git.cworth.org Git - lmno-server/commit
Extend our simple web API with a new /register endpoint
authorCarl Worth <cworth@cworth.org>
Sun, 26 Apr 2020 22:15:53 +0000 (15:15 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 26 Apr 2020 22:18:16 +0000 (15:18 -0700)
commit7e3a39fd3b9a2c828b6aa8fc1a4fa3e5dd9907b4
treeb5e1a1637cf4874cb22273fd667b0f4c77395a91
parentabb35381279727ce45bcc2e1ac9a9d69089d4775
Extend our simple web API with a new /register endpoint

Which uses body-parser and simply prints out the body of the request.

This can now be tested with curl by something as simple as:

curl -i -X POST -H "Content-Type: application/json" -d '{"foo": "bar"}' localhost:3000/register
server.js