Simple mock API server in go
{
"id": "60624180893d170927d32e27",
"username": "[email protected]",
"password": "EQWMJYq40spmT#g",
"fullname": "John Doe",
"mobile": "+91 9999999999",
"createdAt": 1538919475135,
"modifiedAt": 1599340945571,
"blocked": false,
"roles": [
"ROLE_USER"
]
}
Method | Path |
---|---|
GET | /api/users |
POST | /api/users |
GET | /api/users/{id} |
PUT | /api/users/{id} |
DELETE | /api/users/{id} |
Flag | Default Value(s) | Description |
---|---|---|
-endpoint | /api/users/ | Endpoint for API server |
-port | 8080 | Port for the API server |
-version | NA | Print the server version |
-help | NA | Print the help message |
docker pull abhijitwakchaure/mock-api-server-go
Download the latest binary from here
docker run -it -p 8080:8080 abhijitwakchaure/mock-api-server-go
Run the server with default port 8080
./mock-api-server-go-v1.0.0-linux-amd64
Specify the port (e.g. 9000)
./mock-api-server-go-v1.0.0-linux-amd64 -p 9000
Simply run the exe file