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