This is a creation in Article, where the information may have evolved or changed.
Revel is a typical MVC framework that uses the command Revel new [appname] to create a Revel project with the default structure:
App
| CONTROLLERS-MVC mode controller, receiving client request to complete the logical processing and return the rendered result-html,json,xml ...
| Routes-revel automatically generated route code, the URL that is configured in conf/routes and the mapping relationship of the controller is written to the code, to achieve static, I think this can improve performance after build, more efficient than full dynamic mapping, while simplifying development.
| TMP-Temp directory, typically only Mai.go, is a real main function of the Revel app, generated automatically by the Revel framework.
| Views-revel The application's view layer, the template to return the client-side page or data is here
| Init.go-the configuration of the filter applied globally is here
Conf
| APP.CONF application configuration file, the default setting of the global configuration items, as well as the dev and prod mode configuration, by the time you start to specify the parameters of Dev or prod, the application can switch configuration.
| Routes configure mapping between URL requests and background processing code, supporting regular expression matching
Messages
-
Public-static resource files can be placed here, icons, css,javascript ...
--CSS
--img
--JS
Tests-the directory where the test code is located
--Apptest.go