letsgo-framework / letsgo

A go to framework for RESTful API. Docs :
https://letsgo-framework.github.io/
MIT License
11 stars 2 forks source link
letsgo letsgo-framework mongo

letsgo

Build Status Go Report Card Coverage Status Sourcegraph Join the chat at https://gitter.im/letsgo-framework/community

Go api starter

Ingredients

By default, your project's structure will look like this:

letsGo uses godotenv for setting environment variables. The root directory of your application will contain a .env.example file. copy and rename it to .env to set your environment variables.

You need to create a .env.testing file from .env.example for running tests.


Setting up

OR letsgo-cli can be used to setup new project

install letsgo-cli

go get github.com/letsgo-framework/letsgo-cli

Create a new project

letsgo-cli init <import_namespace> <project_name>

Coverall :

go test -v -coverpkg=./... -coverprofile=coverage.out ./...

goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN

Authentication

letsgo uses Go OAuth2 (https://godoc.org/golang.org/x/oauth2) for authentication.


Deploy into Docker

sudo docker run --rm -v "$PWD":/go/src/github.com/letsgo-framework/letsgo -w /go/src/github.com/letsgo-framework/letsgo iron/go:dev go build -o letsgo
sudo docker build -t sab94/letsgo .
sudo docker run --rm -p 8080:8080 sab94/letsgo

Thank You

https://www.jetbrains.com/?from=letsgo