Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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).
- Host: GitHub
- URL: https://github.com/vinodnextcoder/golang-simple-http-server
- Owner: vinodnextcoder
- License: mit
- Created: 2024-01-05T18:33:05.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-30T04:36:08.000Z (11 months ago)
- Last Synced: 2024-01-30T05:32:24.483Z (11 months ago)
- Topics: 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
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 gingit clone https://github.com/vinodnextcoder/golang-simple-http-server.git
you go any dorectory install package and run codecd golang-simple-http-server/gin-web-app
Install Gin:
go get github.com/gin-gonic/ginYou 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:3001http://localhost:3001/user/testuser
http://localhost:3001/contact
```
# You can go to swagger doc
```
http://localhost:3001/swagger/index.html
```