Giter VIP home page Giter VIP logo

goseed's Introduction


Go Seed
Go Seed

A seed project for Restful Web APIs

Built with Golang and Gin

Build Status Coverage Status Go Report Card Latest Release GoDoc Go Version License

Gopher Images by Renée French is licensed under Creative Commons Attributions

Proposal

This repository is a seed for API projects developed in Go. It contains the dependencies, basic structure, test scripts and coverage. It is possible to easily integrate it with other services like Travis Ci, Heroku and Coveralls.

Use from the source

Assuming a recent version installed of Go and the variables GOROOT and GOPATH already defined, the set of commands below should recreate this project locally on a machine. Otherwise, this installation guide available in official of the Golang site will help.

In addition, to manage possible dependencies this project use a vendor folder. Is possible restore dependencies using govendor whose installation instructions are available here or Godep whose installations instructions are available here.

Using govendor the following instructions should work fine, otherwise check the dependency manager documentation.

On Windows

> go get -u github.com/crissilvaeng/goseed
> cd %GOPATH%\github.com\crissilvaeng\goseed
> govendor sync
> go get
> goseed

On Linux

$ go get -u github.com/crissilvaeng/goseed
$ cd $GOPATH/github.com/crissilvaeng/goseed
$ govendor sync
$ go get
$ goseed

To test, run this command PORT=5000 go run main.go.

Then check the results with curl -i http://localhost:5000/v1/hello. If all went well, the following results should be obtained:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Sun, 02 Oct 2016 07:46:36 GMT
Content-Length: 69

{"message":"The answer to life, the universe and everything is 42."}

CI and Deploy

This solution is designed to use the following services: Travis CI, Coveralls and Heroku.

Connect this repository to a account in Coveralls](https://coveralls.io/) service. Save the repo_token. Replace the URL of the README badge.

Connect this repository to a account in Travis CI service. Set two environment variables. One called COVERALLS_TOKEN whit the repo_token from Coveralls. The second called CI_SERVICE with the name of the service.

Create a new app. Next, in deploy option connect with Github and configure to deploy this repository after build on Travis CI.

Change Log

To see the changes in this project, see the change log file.

Contribution

To contribute to this project, see the file contribution tips and code of conduct.

License

The MIT License (MIT). To see the details of this license, see the license file.

:octocat:

goseed's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

leoferlopes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.