Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vinodnextcoder/golang-simple-http-server

basics of writing a RESTful web service API with Go and the Gin Web Framework (Gin).
https://github.com/vinodnextcoder/golang-simple-http-server

gin-framework gin-gonic gin-handlerfunc gin-swagger ginswagger go-api go-backend go-router golang golang-gin golang-gin-restfulapi golang-http golang-server handlerfunc swagger swaggerfiles

Last synced: about 1 month ago
JSON representation

basics of writing a RESTful web service API with Go and the Gin Web Framework (Gin).

Awesome Lists containing this project

README

        

## Writing a basic HTTP server is easy using Gin package

# To run http server

cd simple-http-server

```
for gin

git clone https://github.com/vinodnextcoder/golang-simple-http-server.git
you go any dorectory install package and run code

cd golang-simple-http-server/gin-web-app

Install Gin:
go get github.com/gin-gonic/gin

You can run your Gin web application by executing the main.go file:

go run main.go

````

# to call api endpoint in postman

```

for folder gin-web-app
http://localhost:3001

http://localhost:3001/user/testuser

http://localhost:3001/contact

```

# You can go to swagger doc

```
http://localhost:3001/swagger/index.html
```