An open API service indexing awesome lists of open source software.

https://github.com/felipedemacedo/node-api

Very basic Node API
https://github.com/felipedemacedo/node-api

api javascript js json node node-api nodemon npm rest restify restifyjs

Last synced: 3 days ago
JSON representation

Very basic Node API

Awesome Lists containing this project

README

        

npm init -y

npm i [email protected] --save -E

npm i @types/[email protected] -D -E

npm i typescript -g

npm i nodemon -g

tsc --init

***** tsc -w
***** nodemon dist/main.js

--------------------------------------------------------------------
http://localhost:3000/info?param1=value1&param2=value2

{
browser: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36",
method: "GET",
url: "/info?param1=value1&param2=value2",
path: "/info",
query: {
param1: "value1",
param2: "value2"
}
}
--------------------------------------------------------------------

http://localhost:3000/users

[
{
name: "user 1",
email: "[email protected]"
},
{
name: "user 2",
email: "[email protected]"
}
]

--------------------------------------------------------------------

http://localhost:3000/users/1

{
id: "1",
name: "user 1",
email: "[email protected]"
}