Beispiel #1
0
func main() {

	app := config.NewApp(".")

	routes.Setup(app)
	app.Negroni.Run(":" + os.Getenv("PORT"))
}
Beispiel #2
0
import (
	"github.com/gshilin/shidur-go/config"
	"github.com/joho/godotenv"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"testing"
)

var (
	app *config.App
)

func TestTest(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Test Suite")
}

var _ = BeforeSuite(func() {

	// Load test ENV variables
	godotenv.Load("../.env.test")

	// Create a new app
	app = config.NewApp("../.")
})

var _ = BeforeEach(func() {
	// Reset the DB before every test
	app.DB.Exec("DELETE FROM messages;")
})