gorilla-seed

command module
v0.0.0-...-4b40179 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2016 License: MIT Imports: 9 Imported by: 0

README

A quick seed for the golang-gorilla stack

Getting Started

  • Clone the repo: git clone https://github.com/joelewis/gorilla-seed
  • Update the config variables in main.go (DB_URL, SERVER_PORT, etc.)
  • Rename the directory's name to your app's name. mv /path/to/gorilla-seed /path/to/my-app-name
  • Update import paths. Eg. import "path/to/gorilla-seed/models" to import "path/to/my-app-name/models"
  • Compile: go build
  • Initialize tables: ./my-app-name inittables
  • Run server : ./my-app-name

What is inside?

Nothing much.

  • A developer friendly ORM - gorm
  • A user model with a basic setup of gorilla/sessions for authentication. There is no pages or handlers for user signups or login/logout. It is left for you to implement.

Where to start?

  • Define the route in routes.go
  • Add corresponding handler in controllers/controllers.go
  • Add the model structs in models/models.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL