A simple REST API that provides CRUD operations on a hero
object, it was built using Node and PostgreSQL.
This project makes use of Typescript, TypeORM, Hapi, and Nconf.
1. Clone the application
git clone https://github.com/nicolaspearson/node.heroes.api.git
2. Start the database
docker-compose up
3. Build and run the app using cargo
npm run start
The app will start running at http://localhost:8000
npm install -g http-server
npm run build
http-server -p 8000 ./build
The app will start running at http://localhost:8000
The following endpoints are available:
GET /hero?id={heroId}
GET /heroes
POST /hero
PUT /hero/{heroId}
DELETE /hero/{heroId}
Run this command to benchmark request performance:
wrk -d1m http://localhost:8000/heroes