Categorygithub.com/abhijitWakchaure/mock-api-server-go
repositorypackage
1.0.5
Repository: https://github.com/abhijitwakchaure/mock-api-server-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

GitHub license Docker Cloud Build Status GitHub release (latest SemVer)

mock-api-server-go

Simple mock API server in go

Schema for user struct

{
	"id": "60624180893d170927d32e27",
	"username": "[email protected]",
	"password": "EQWMJYq40spmT#g",
	"fullname": "John Doe",
	"mobile": "+91 9999999999",
	"createdAt": 1538919475135,
	"modifiedAt": 1599340945571,
	"blocked": false,
	"roles": [
		"ROLE_USER"
	]
}

Exposed APIs (Default)

MethodPath
GET/api/users
POST/api/users
GET/api/users/{id}
PUT/api/users/{id}
DELETE/api/users/{id}

Flags

FlagDefault Value(s)Description
-endpoint/api/users/Endpoint for API server
-port8080Port for the API server
-versionNAPrint the server version
-helpNAPrint the help message

Download the API server

Docker

docker pull abhijitwakchaure/mock-api-server-go

Linux, Windows or Mac

Download the latest binary from here

How to Run the server

Docker

docker run -it -p 8080:8080 abhijitwakchaure/mock-api-server-go

Linux or Mac

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

Windows

Simply run the exe file