Just a basic Node + Express CRUD app with pg-promise
- Fork/Clone
- Install Dependencies
- Fire up the Postgres server
- Run
psql -f src/server/db/beers.sql
to set up the database, create a table, and seed the table gulp
With HTTPie:
$ http GET http://localhost:3000/api/v1/beers
$ http GET http://localhost:3000/api/v1/beers/1
$ http POST http://localhost:3000/api/v1/beers name=concentration abv=9 brand="russian river" style="sour porter"
$ http PUT http://localhost:3000/api/v1/beers/2 field=abv value=222
$ http DELETE http://localhost:3000/api/v1/beers/1
- Pro: Easy to set up and understand
- Con: Hard to test and scale
- Pro: Easier to test and scale
- Con: Harder to set up and understand
- Pro: Easiest to test and scale
- Con: Hardest to set up and understand