Public | Automated Build

Last pushed: a year ago
Short Description
Example JSON API written in Go
Full Description

Mock Go API

An example JSON API written in Go. This is used for various examples and testing.

Run w/ Docker

Install Docker for your machine. To run the container:

$ docker run -p 8000:8000 nexmill/mock-go-api

View the project on Docker Hub

Configuration

To set the port the app listens on set the APP_PORT environment variable. By default it will listen on port 8000.

Endpoints

The following endpoints are available (no data is persisted, logic is mocked).

Method URL Example action
GET /products List all products.
POST /products Create new product.
GET /products/[ID] Show product detail. ID can be 1 or 2, error response otherwise.
PUT /products/[ID] Update product. ID can be anything.
DELETE /products/[ID] Delete product. ID can be anything.
Docker Pull Command
Owner
nexmill
Source Repository

Comments (0)