Testing Golang project.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
controllers
models
routers
vendor
.gitattributes
.gitignore
LICENSE
README.md
app.go

README.md

Golang app

This is an app to learn Go.

Getting Started

This project is made with Go, Govendor, Fresh, Gin It´s also using a basic file structure MVC style.

Prerequisites

Before start, download and install Go, create your Workspace and set the GOPATH environment variable

Install Govendor. It´s used to manage the package.

$ go get -u github.com/kardianos/govendor

Install Fresh, Fresh can help build without reload.

$ go get -u github.com/pilu/fresh

Install Gin, the fastest full-featured web framework for Golang.

$ go get github.com/gin-gonic/gin

Install GORM, the fantastic ORM library for Golang.

$ go get -u github.com/jinzhu/gorm

Install pq, a pure Go postgres driver for Go's database/sql package.

$ go get github.com/lib/pq

Installing

Create next folder skeleton in [workspace directory]/src:

----------------------------
    projectName
        controllers
        models
        routers
        static
            css
            fonts
            images
            js
        templates
            layouts
        utils
        app.go
----------------------------

Init Govendor in project

$ cd [workspace directory]/src/projectName
$ govendor init

Add dependencies

$ govendor fetch github.com/gin-gonic/gin
$ govendor fetch github.com/jinzhu/gorm
$ govendor fetch github.com/lib/pq

Running the tests

$ fresh

Deployment

Important Settings

  • Open config/database.js and please configure your db (the example projects is using POSTGRESQL).

Authors

License

Code released under the MIT License.