https://github.com/walkerrandolphsmith/go-basics
https://github.com/walkerrandolphsmith/go-basics
golang rest-api
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/walkerrandolphsmith/go-basics
- Owner: walkerrandolphsmith
- Created: 2019-05-13T22:06:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T14:38:35.000Z (about 7 years ago)
- Last Synced: 2024-05-01T23:41:57.600Z (about 2 years ago)
- Topics: golang, rest-api
- Language: Go
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Getting Started
GO Workspace contains multiple version control repositories:
* `src` contains source files
* `bin` contains executables which are built by go tools
```
bin/
hello # command executable
src/
github.com/:user/:repo/
.git/
hello/
hello.go # command source
```
Packages are resolved by the `$GOPATH` environment variable. Therefore when you see an import statement in a go package like the following it is not importing "by url":
```go
import (
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/render"
"github.com/walkerrandolphsmith/go-playground/features/flag"
)
```
First we should build our contianers using
```
./ctl.sh build
```
Next we can run our application using
```
./ctl.sh up
```
Interact with the API via http://localhost:3000/v1/api/flag or the database ui via http://localhost:8081