Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shehand/restful_api-go
A stater Go programming language package for RESTful web services
https://github.com/shehand/restful_api-go
Last synced: 19 days ago
JSON representation
A stater Go programming language package for RESTful web services
- Host: GitHub
- URL: https://github.com/shehand/restful_api-go
- Owner: shehand
- Created: 2019-05-13T17:59:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-03T14:25:59.000Z (about 4 years ago)
- Last Synced: 2024-06-21T08:19:18.642Z (5 months ago)
- Language: Go
- Homepage: https://shehand.github.io/RESTful_API-Go/
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RESTful_API service - Go
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/56fdcd3089994d75b55e3fe1303ef447)](https://app.codacy.com/app/shehand/RESTful_API-Go?utm_source=github.com&utm_medium=referral&utm_content=shehand/RESTful_API-Go&utm_campaign=Badge_Grade_Dashboard)
## Installation
First of all make sure to install Go Programming Language
in your computer. Try [this link](https://golang.org/doc/install) to follow the installation.And add the `GOPATH` path variable if it is not set. Use [this link](https://github.com/golang/go/wiki/SettingGOPATH) to follow a tutorial to set the `GOPATH` variable
Download the source code. You can either download it as a zip file and
extract it or simply type the command in the terminal or bash or cmd,`git clone
https://github.com/shehand/RESTfu_API-Go.git`change your directory into the project folder. And run the command,
`go run main.go`
Then it will start the server on http://localhost:8000. To test the api use postman or curl and make sure to follow the url like given below.
> NOTE
>
> If you failed to start the server try to configure your database
details with the project. To update database details find the file .env in the project directory or .env.example and change the database detils. If the error is about some missing dependencies try like below.
>
> if it says `github.com/gorilla/mux` is missin for a example try in the terminal
>
>`go get github.com/{package-name}` here the package name is `gorilla/mux`
>### Some Basic API urls
* http://localhost:8000/api/user/new -> Create User
* http://localhost:8000/api/user/login -> login
* http://localhost:8000/api/api/me/contacts -> get contactsFeel free to open issues and PR's are welcome. Happy coding... ;)