-
Notifications
You must be signed in to change notification settings - Fork 154
Basic rundown
This is stuff from IRC chat,,as notes for future includsion//
20:26] here are my notes from a long time ago:
[20:26] - run revel run github.com/user/apprepo
[20:26] 1 set run mode (dev or prod)
[20:26] 2 call revel.Init()
[20:26] - initialize Revel with the detected run mode, HTTP port and import path (e.g. github.com/user/apprepo)
[20:26] - determine revel/app source, revel, app base, app folder and views path
[20:26] - determine list of code and conf paths
[20:26] - determine template paths
[20:26] - github.com/user/apprepo/app/views
[20:26] - github.com/robfig/revel/templates
[20:27] - determine values for various config variables based on app.conf
[20:27] - setup loggers
[20:27] - load modules
[20:27] - set initialized flag to true
[20:27] 3 load mime-types.conf
[20:27] 4 set port to run HTTP on (defaults to app.conf value or override command line argument)
[20:27] 5 send log details about parsed config and app details
[20:27] 6 run app harness
[20:27] - if file watching is enabled, create and run the harness (generate your app's main.go)
[20:27] - else, use the harness to build the app and run it (build your app's binary)
=========================== [20:39] ah [20:39] here's more relevant notes: [20:39] - why does the harness need the source code in order to function? [20:39] - it seems it uses the code to discover the controller/action routes, validation keys and test suites [20:39] - it uses the code to generate the main.go file which contain the dynamic routes, validation keys and test suites [20:39] - the generated code is created each time the app is built [20:39] - if you want to take advantage of the hot code loading, you need the source in order to regenerate the dynamic routes, etc