Skip to content

Commit

Permalink
- updatedurl for use with heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
savaki committed Aug 11, 2014
1 parent c570b3d commit 40bfb35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion main.go
@@ -1,7 +1,6 @@
package main

import (
"github.com/gin-gonic/gin"
"net/http"
"os"
)
Expand Down
3 changes: 2 additions & 1 deletion routes.go
Expand Up @@ -3,6 +3,7 @@ package main
import (
"github.com/gin-gonic/gin"
"net/http"
"os"
)

func makeRoutes(todo Todo) http.Handler {
Expand Down Expand Up @@ -36,7 +37,7 @@ func makeRoutes(todo Todo) http.Handler {
template := TodoItem{}
if c.EnsureBody(&template) {
fqdn := func(path string) string {
return "http://ec2-54-176-180-200.us-west-1.compute.amazonaws.com:8080" + path
return "http://todo-backend-golang.herokuapp.com:" + os.Getenv("PORT") + path
}
item := todo.Create(template, fqdn)
c.Writer.Header().Add("Location", "/todos/"+item.Id)
Expand Down

0 comments on commit 40bfb35

Please sign in to comment.