bundle exec install
mongod
to start the mongo serverbundle exec ruby server
[GET] /api/v1/facts
[
{
"fact_id": "1",
"title": "example 1",
"paragraph": "minister under the influence is a hackbrixit project"
},
{
"fact_id": "2",
"title": "Minister under the influence",
"paragraph": "Minister under the influence is a hack brixit app"
}
]
In the command line
curl -i -X POST -H "Content-Type: application/json" -d '{"title":"Minister under the influence", "paragraph":"Minister under the influence is a hack brixit app", "fact_id":"0123456789"}' http://localhost:4567/api/v1/facts
HTTP/1.1 201 Created
Content-Type: application/json
Location: http://localhost:4567/api/v1/books/5710b7b6fef9afa7a8e5db81
...