martini-example

command module
v0.0.0-...-06f2c85 Latest Latest
Warning

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

Go to latest
Published: May 30, 2014 License: Unlicense Imports: 7 Imported by: 0

README

Martini-Example

System dependencies

Installing Go
  • Install Go brew install go

  • Setup your Go environment:

    export GOPATH=<Your Go working directory here>
    export PATH="$PATH:$GOPATH/bin"
    
Installing Postgres
  • Install Postgres brew install postgres

    Alternatively, use postgres app.

Configuration

  • Create the database createdb example_app_dev

  • Populate it using the example db/seeds.sql file: psql -d example_app_dev < db/seeds.sql

  • Create .env file:

    DATABASE_URL="dbname=example_app_dev sslmode=disable"
    API_USERNAME=<username>
    API_PASSWORD=<password>
    

    See lib/pq docs to see more details about connection parameters

  • Run go get to install app dependencies

  • Run app go run main.go

Tests

None 😢

Deployment

Deployment instructions for heroku.

Setup
  • Make sure to have the heroku toolbelt installed.

  • Then run:

    heroku create <app-name> -b https://github.com/kr/heroku-buildpack-go.git
    
  • Add the heroku git repository to your git remotes

  • Install Godep to manage app dependencies by running: go get github.com/tools/godep

Before pushing
  • Every time that you add a new a dependency, make sure run godep save and add changed files inside Godeps directory.
Release
  • git push <heroku-remote> or git push <heroku-remote> <feature-branch>:master

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/coopernurse/gorp
Package gorp provides a simple way to marshal Go structs to and from SQL databases.
Package gorp provides a simple way to marshal Go structs to and from SQL databases.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.
_workspace/src/github.com/martini-contrib/binding
Package binding transforms a raw request into a struct ready to be used your application.
Package binding transforms a raw request into a struct ready to be used your application.
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
app

Jump to

Keyboard shortcuts

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