adjustment

This commit is contained in:
mr 2025-03-28 08:46:50 +01:00
parent fe5163b3d9
commit 0cd3a9457e
7 changed files with 17 additions and 10 deletions

View File

@ -6,8 +6,13 @@ build: clean
run: run:
bee run -gendoc=true -downdoc=true bee run -gendoc=true -downdoc=true
dev: purge:
bee generate routers && HTTPPORT=8093 bee run -gendoc=true -downdoc=true lsof -t -i:8093 | xargs kill | true
run-dev:
bee generate routers && bee run -gendoc=true -downdoc=true -runmode=prod
dev: purge run-dev
debug: debug:
bee run -downdebug -gendebug bee run -downdebug -gendebug
@ -27,4 +32,4 @@ publish-registry:
all: docker publish-kind publish-registry all: docker publish-kind publish-registry
.PHONY: build run clean docker publish-kind publish-registry .PHONY: build run clean docker publish-kind publish-registry

View File

@ -1,5 +1,5 @@
appname = oc-peer appname = oc-peer
httpport = 8080 httpport = 8093
runmode = dev runmode = dev
autorender = false autorender = false
copyrequestbody = true copyrequestbody = true

View File

@ -14,6 +14,9 @@ type VersionController struct {
// @Success 200 // @Success 200
// @router / [get] // @router / [get]
func (c *VersionController) GetAll() { func (c *VersionController) GetAll() {
c.Data["json"] = map[string]string{"version": "1"} c.Data["json"] = map[string]string{
"service": "oc-peer",
"version": "1",
}
c.ServeJSON() c.ServeJSON()
} }

View File

@ -18,8 +18,8 @@ services:
- 8093:8080 - 8093:8080
container_name: oc-peer container_name: oc-peer
networks: networks:
- catalog - oc
networks: networks:
catalog: oc:
external: true external: true

View File

@ -1,6 +1,5 @@
{ {
"MONGO_URL":"mongodb://mongo:27017/", "MONGO_URL":"mongodb://mongo:27017/",
"MONGO_DATABASE":"DC_myDC", "MONGO_DATABASE":"DC_myDC",
"NATS_URL": "nats://nats:4222", "NATS_URL": "nats://nats:4222"
"PORT" : 8080
} }

BIN
oc-peer Executable file

Binary file not shown.

View File

@ -1,5 +1,5 @@
{ {
"port" : 8080, "port" : 8093,
"MONGO_URL":"mongodb://localhost:27017/", "MONGO_URL":"mongodb://localhost:27017/",
"MONGO_DATABASE":"DC_myDC", "MONGO_DATABASE":"DC_myDC",
"NATS_URL": "nats://localhost:4222" "NATS_URL": "nats://localhost:4222"