8ef18f5f by xiemengjun

add some config intro

1 parent 53ce6ad3
Showing 1 changed file with 54 additions and 1 deletions
...@@ -262,9 +262,62 @@ beego has three default defined funtion: ...@@ -262,9 +262,62 @@ beego has three default defined funtion:
262 262
263 Compare is a quick and dirty comparison function. It will convert whatever you give it to strings and see if the two values are equal.Whitespace is trimmed. Used by the template parser as "eq" 263 Compare is a quick and dirty comparison function. It will convert whatever you give it to strings and see if the two values are equal.Whitespace is trimmed. Used by the template parser as "eq"
264 264
265 ## Beego Variables
266 ============
267 beego has many default variables, as follow is a list to show:
268
269 - BeeApp *App
270
271 global app init by the beego. You needn't to init it, just use it.
272
273 - AppName string
274
275 appname is what you project named, default is beego
276
277 - AppPath string
278
279 this is the project path
280
281 - StaticDir map[string]string
282
283 staticdir store the map which request url to the static file path
284
285 default is the request url has prefix `static`, then server the path in the app path
286
287 - HttpAddr string
288
289 http listen address, defult is ""
290
291 - HttpPort int
292
293 http listen port, default is 8080
294
295 - RecoverPanic bool
296
297 RecoverPanic mean when the program panic whether the process auto recover,default is true
298
299 - AutoRender bool
300
301 whether run the Render function, default is true
302
303 - ViewsPath string
304
305 the template path, default is /views
306
307 - RunMode string //"dev" or "prod"
308
309 the runmode ,default is prod
310
311 - AppConfig *Config
312
313 Appconfig is a result that parse file from conf/app.conf, if this file not exist then the variable is nil. if the file exist, then return the Config as follow.
265 314
266 ## Config 315 ## Config
267 ============ 316 ============
317
318 beego support parse ini file, beego will parse the default file in the path `conf/app.conf`
319
320
268 321
269 ## Logger 322 ## Logger
270 ============ 323 ============
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!