diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ef72f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea/ +*.iml + diff --git a/revel/skeleton/README.md b/revel/skeleton/README.md index 1abb305..d418163 100644 --- a/revel/skeleton/README.md +++ b/revel/skeleton/README.md @@ -1,75 +1,43 @@ # Welcome to Revel -## Getting Started - A high-productivity web framework for the [Go language](http://www.golang.org/). + ### Start the web server: - revel run myapp - - Run with --help for options. + revel run myapp ### Go to http://localhost:9000/ and you'll see: -"It works" + "It works" -### Description of Contents +## Code Layout -The default directory structure of a generated Revel application: +The directory structure of a generated Revel application: - myapp App root - app App sources - controllers App controllers - init.go Interceptor registration - models App domain models - routes Reverse routes (generated code) - views Templates - tests Test suites - conf Configuration files - app.conf Main configuration file - routes Routes definition - messages Message files - public Public assets - css CSS files - js Javascript files - images Image files + conf/ Configuration directory + app.conf Main app configuration file + routes Routes definition file -app + app/ App sources + init.go Interceptor registration + controllers/ App controllers go here + views/ Templates directory - The app directory contains the source code and templates for your application. + messages/ Message files -conf + public/ Public static assets + css/ CSS files + js/ Javascript files + images/ Image files - The conf directory contains the application’s configuration files. There are two main configuration files: - - * app.conf, the main configuration file for the application, which contains standard configuration parameters - * routes, the routes definition file. + tests/ Test suites -messages +## Help - The messages directory contains all localized message files. - -public - - Resources stored in the public directory are static assets that are served directly by the Web server. Typically it is split into three standard sub-directories for images, CSS stylesheets and JavaScript files. - - The names of these directories may be anything; the developer need only update the routes. - -test - - Tests are kept in the tests directory. Revel provides a testing framework that makes it easy to write and run functional tests against your application. - -### Follow the guidelines to start developing your application: - -* The README file created within your application. -* The [Getting Started with Revel](http://revel.github.io/tutorial/index.html). +* The [Getting Started with Revel](http://revel.github.io/tutorial/gettingstarted.html). * The [Revel guides](http://revel.github.io/manual/index.html). -* The [Revel sample apps](http://revel.github.io/samples/index.html). +* The [Revel sample apps](http://revel.github.io/examples/index.html). * The [API documentation](https://godoc.org/github.com/revel/revel). -## Contributing -We encourage you to contribute to Revel! Please check out the [Contributing to Revel -guide](https://github.com/revel/revel/blob/master/CONTRIBUTING.md) for guidelines about how -to proceed. [Join us](https://groups.google.com/forum/#!forum/revel-framework)! diff --git a/revel/skeleton/app/controllers/app.go b/revel/skeleton/app/controllers/app.go index e76d76b..1e94062 100644 --- a/revel/skeleton/app/controllers/app.go +++ b/revel/skeleton/app/controllers/app.go @@ -1,6 +1,8 @@ package controllers -import "github.com/revel/revel" +import ( + "github.com/revel/revel" +) type App struct { *revel.Controller diff --git a/revel/skeleton/app/init.go b/revel/skeleton/app/init.go index 08e3b80..cca1b81 100644 --- a/revel/skeleton/app/init.go +++ b/revel/skeleton/app/init.go @@ -1,6 +1,8 @@ package app -import "github.com/revel/revel" +import ( + "github.com/revel/revel" +) var ( // AppVersion revel app version (ldflags) @@ -27,8 +29,7 @@ func init() { revel.ActionInvoker, // Invoke the action. } - // register startup functions with OnAppStart - // ( order dependent ) + // register startup functions with OnAppStart ( order dependent ) // revel.OnAppStart(InitDB) // revel.OnAppStart(FillCache) } diff --git a/revel/skeleton/conf/app.conf.template b/revel/skeleton/conf/app.conf.template index 86f337d..b3d7e9d 100644 --- a/revel/skeleton/conf/app.conf.template +++ b/revel/skeleton/conf/app.conf.template @@ -1,11 +1,9 @@ ################################################################################ # Revel configuration file -# See: -# http://revel.github.io/manual/appconf.html -# for more detailed documentation. +# More info at http://revel.github.io/manual/appconf.html ################################################################################ -# This sets the `AppName` variable which can be used in your code as +# Sets the `AppName` variable which can be used in your code as # `if revel.AppName {...}` app.name = {{ .AppName }} diff --git a/revel/skeleton/conf/routes b/revel/skeleton/conf/routes index 9ed462f..35e99fa 100644 --- a/revel/skeleton/conf/routes +++ b/revel/skeleton/conf/routes @@ -1,8 +1,11 @@ -# Routes +# Routes Config +# # This file defines all application routes (Higher priority routes first) -# ~~~~ +# module:testrunner +# module:jobs + GET / App.Index diff --git a/revel/skeleton/tests/apptest.go b/revel/skeleton/tests/apptest.go index e81ca3d..dfefeb4 100644 --- a/revel/skeleton/tests/apptest.go +++ b/revel/skeleton/tests/apptest.go @@ -1,6 +1,8 @@ package tests -import "github.com/revel/revel/testing" +import ( + "github.com/revel/revel/testing" +) type AppTest struct { testing.TestSuite