Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

App name change to enable vscode compile and debug #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ typings/
.fusebox/

# DynamoDB Local files
.dynamodb/
.dynamodb/

# Temp files
*.tmp

# Debug binary
__debug_bin
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"env": {},
"args": []
}
]
}
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM golang:1.9.4 as builder

# Set the working directory to the app directory
WORKDIR /go/src/captureorderfd
WORKDIR /go/src/azch-captureorder

# Install godeps
RUN go get -u -v github.com/astaxie/beego
Expand All @@ -17,13 +17,13 @@ RUN go get gopkg.in/matryer/try.v1
COPY . .

# Build stage
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o captureorderfd .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o azch-captureorder .

## App stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/captureorderfd .
COPY --from=builder /go/src/azch-captureorder .

# Define environment variables

Expand All @@ -40,4 +40,4 @@ EXPOSE 8080

# Set the entry point of the container to the bee command that runs the
# application and watches for changes
CMD ["./captureorderfd", "run"]
CMD ["./azch-captureorder", "run"]
2 changes: 1 addition & 1 deletion conf/app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appname = captureorderfd
appname = azch-captureorder
httpport = 8080
runmode = dev
autorender = false
Expand Down
2 changes: 1 addition & 1 deletion controllers/order.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controllers

import (
"captureorderfd/models"
"azch-captureorder/models"
"encoding/json"
"os"
"time"
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
_ "captureorderfd/routers"
_ "azch-captureorder/routers"

"github.com/astaxie/beego"
)
Expand Down
31 changes: 17 additions & 14 deletions routers/commentsRouter_controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ import (

func init() {

beego.GlobalControllerRouter["captureorderfd/controllers:OrderController"] = append(beego.GlobalControllerRouter["captureorderfd/controllers:OrderController"],
beego.ControllerComments{
Method: "Post",
Router: `/`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["azch-captureorder/controllers:OrderController"] = append(beego.GlobalControllerRouter["azch-captureorder/controllers:OrderController"],
beego.ControllerComments{
Method: "Post",
Router: `/`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["azch-captureorder/controllers:OrderController"] = append(beego.GlobalControllerRouter["azch-captureorder/controllers:OrderController"],
beego.ControllerComments{
Method: "Get",
Router: `/`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["captureorderfd/controllers:OrderController"] = append(beego.GlobalControllerRouter["captureorderfd/controllers:OrderController"],
beego.ControllerComments{
Method: "Get",
Router: `/`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
}
2 changes: 1 addition & 1 deletion routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package routers

import (
"captureorderfd/controllers"
"azch-captureorder/controllers"

"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
Expand Down