leoferlopes / tuesday-api

It's pizza time!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tuesday API

It's pizza time!

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/leoferlopes/tuesday-api
> cd %GOPATH%\github.com\leoferlopes\tuesday-api
> govendor sync
> go get
> tuesday-api

On Linux

$ go get -u github.com/leoferlopes/tuesday-api
$ cd $GOPATH/github.com/leoferlopes/tuesday-api
$ govendor sync
$ go get
$ tuesday-api

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:

About

It's pizza time!


Languages

Language:Go 54.8%Language:Shell 45.2%