All Projects → landaire → qrest

landaire / qrest

Licence: MIT license
A super quick to setup RESTful JSON server

Programming Languages

go
31211 projects - #10 most used programming language

qrest is a quick RESTful JSON server

Build Status

Usage

Create a JSON file containing the data you'd like to be part of your server. An example file might look like:

{
    "posts": [ { "id": 1, "title": "Foo" } ]
}

Start qrest with this file as an argument:

qrest db.json

Or in a docker container:

$ docker build -t qrest .
$ docker run --rm -p 3000:3000 qrest "db.json" # assuming db.json is in this source directory

This will create the following routes for you to use:

POST /posts (creates a new post record)
GET /posts (returns all post records)
GET /posts/:id (returns a specific record)
PUT /posts/:id (creates or updates a record with the specified ID)
PATCH /posts/:id (updates a record with the specified ID)
DELETE /posts/:id (deletes the specified record)

License

This project is released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].