Compare commits
No commits in common. "17aeef4ad0e91e2a6e7259edf5ecaf5fdc16205b" and "05e041cccf878af74cb6ad493f468d70067f6a05" have entirely different histories.
17aeef4ad0
...
05e041cccf
4
main.go
4
main.go
@ -16,7 +16,7 @@ func main() {
|
|||||||
// Load the right config file
|
// Load the right config file
|
||||||
o := oclib.GetConfLoader()
|
o := oclib.GetConfLoader()
|
||||||
|
|
||||||
// feed the library with the loaded config
|
// feed the library with the loaded config,
|
||||||
oclib.SetConfig(
|
oclib.SetConfig(
|
||||||
o.GetStringDefault("MONGO_URL", "mongodb://127.0.0.1:27017"),
|
o.GetStringDefault("MONGO_URL", "mongodb://127.0.0.1:27017"),
|
||||||
o.GetStringDefault("MONGO_DATABASE", "DC_myDC"),
|
o.GetStringDefault("MONGO_DATABASE", "DC_myDC"),
|
||||||
@ -29,6 +29,6 @@ func main() {
|
|||||||
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
|
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||||
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
||||||
|
//}
|
||||||
beego.Run()
|
beego.Run()
|
||||||
}
|
}
|
||||||
|
BIN
oc-catalog
BIN
oc-catalog
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
// @APIVersion 1.0.0
|
// @APIVersion 1.0.0
|
||||||
// @Title oc-catalog
|
// @Title beego Test API
|
||||||
// @Description OpenCloud catalog
|
// @Description beego has a very cool tools to autogenerate documents for your API
|
||||||
// @Contact admin@o-cloud.io
|
// @Contact astaxie@gmail.com
|
||||||
// @TermsOfServiceUrl http://cloud.o-forge.io/
|
// @TermsOfServiceUrl http://beego.me/
|
||||||
// @License MIT
|
// @License Apache 2.0
|
||||||
// @LicenseUrl https://opensource.org/license/mit
|
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
package routers
|
package routers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "oc-catalog",
|
"title": "beego Test API",
|
||||||
"description": "OpenCloud catalog\n",
|
"description": "beego has a very cool tools to autogenerate documents for your API\n",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"termsOfService": "http://cloud.o-forge.io/",
|
"termsOfService": "http://beego.me/",
|
||||||
"contact": {
|
"contact": {
|
||||||
"email": "admin@o-cloud.io"
|
"email": "astaxie@gmail.com"
|
||||||
},
|
},
|
||||||
"license": {
|
"license": {
|
||||||
"name": "MIT",
|
"name": "Apache 2.0",
|
||||||
"url": "https://opensource.org/license/mit"
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"basePath": "/oc/",
|
"basePath": "/oc/",
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
info:
|
info:
|
||||||
title: oc-catalog
|
title: beego Test API
|
||||||
description: |
|
description: |
|
||||||
OpenCloud catalog
|
beego has a very cool tools to autogenerate documents for your API
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
termsOfService: http://cloud.o-forge.io/
|
termsOfService: http://beego.me/
|
||||||
contact:
|
contact:
|
||||||
email: admin@o-cloud.io
|
email: astaxie@gmail.com
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: Apache 2.0
|
||||||
url: https://opensource.org/license/mit
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
basePath: /oc/
|
basePath: /oc/
|
||||||
paths:
|
paths:
|
||||||
/data/:
|
/data/:
|
||||||
|
Loading…
Reference in New Issue
Block a user