Genie.Generator.newappFunction
newapp(app_name::String; autostart::Bool = true, fullstack::Bool = false, dbsupport::Bool = false, mvcsupport::Bool = false) :: Nothing

Scaffolds a new Genie app, setting up the file structure indicated by the various arguments.

Arguments

  • path::String: the name of the app and the path where to bootstrap it. Spaces not allowed
  • autostart::Bool: automatically start the app once the file structure is created
  • fullstack::Bool: the type of app to be bootstrapped. The fullstack app includes MVC structure, DB connection code, and asset pipeline files.
  • dbsupport::Bool: bootstrap the files needed for DB connection setup via the SearchLight ORM
  • mvcsupport::Bool: adds the files used for HTML+Julia view templates rendering and working with resources

Examples

julia> Genie.newapp("MyGenieApp")
2019-08-06 16:54:15:INFO:Main: Done! New app created at MyGenieApp
2019-08-06 16:54:15:DEBUG:Main: Changing active directory to MyGenieApp
2019-08-06 16:54:15:DEBUG:Main: Installing app dependencies
 Resolving package versions...
  Updating `~/Dropbox/Projects/GenieTests/MyGenieApp/Project.toml`
  [c43c736e] + Genie v0.10.1
  Updating `~/Dropbox/Projects/GenieTests/MyGenieApp/Manifest.toml`

2019-08-06 16:54:27:INFO:Main: Starting your brand new Genie app - hang tight!
 _____         _
|   __|___ ___|_|___
|  |  | -_|   | | -_|
|_____|___|_|_|_|___|

┌ Info:
│ Starting Genie in >> DEV << mode
└
[ Info: Logging to file at MyGenieApp/log/dev.log
[ Info: Ready!
2019-08-06 16:54:32:DEBUG:Main: Web Server starting at http://127.0.0.1:8000
2019-08-06 16:54:32:DEBUG:Main: Web Server running at http://127.0.0.1:8000
Genie.Generator.newapp_webserviceFunction
newapp_webservice(path::String = "."; autostart::Bool = true, dbsupport::Bool = false) :: Nothing

Template for scaffolding a new Genie app suitable for nimble web services.

Arguments

  • path::String: the name of the app and the path where to bootstrap it
  • autostart::Bool: automatically start the app once the file structure is created
  • dbsupport::Bool: bootstrap the files needed for DB connection setup via the SearchLight ORM
Genie.Generator.newapp_mvcFunction
newapp_mvc(path::String = "."; autostart::Bool = true) :: Nothing

Template for scaffolding a new Genie app suitable for MVC web applications (includes MVC structure and DB support).

Arguments

  • path::String: the name of the app and the path where to bootstrap it
  • autostart::Bool: automatically start the app once the file structure is created
Genie.Generator.newapp_fullstackFunction
newapp_fullstack(path::String = "."; autostart::Bool = true) :: Nothing

Template for scaffolding a new Genie app suitable for full stack web applications (includes MVC structure, DB support, and frontend asset pipeline).

Arguments

  • path::String: the name of the app and the path where to bootstrap it
  • autostart::Bool: automatically start the app once the file structure is created
Genie.Generator.newcontrollerFunction
newcontroller(resource_name::String) :: Nothing

Generates a new Genie controller file and persists it to the resources folder.

Genie.Generator.newresourceFunction
newresource(resource_name::String, config::Settings) :: Nothing

Generates all the files associated with a new resource and persists them to the resources folder.

Genie.Generator.setup_resource_pathFunction
setup_resource_path(resource_name::String) :: String

Computes and creates the directories structure needed to persist a new resource.

Genie.Generator.write_resource_fileFunction
write_resource_file(resource_path::String, file_name::String, resource_name::String) :: Bool

Generates all resouce files and persists them to disk.

Genie.Generator.resource_does_not_existFunction
resource_does_not_exist(resource_path::String, file_name::String) :: Bool

Returns true if the indicated resources does not exists - false otherwise.

Genie.Generator.secret_tokenFunction
secret_token() :: String

Generates a random secret token to be used for configuring the call to Genie.secret_token!.

Genie.Generator.fullstack_appFunction
fullstack_app(app_path::String = ".") :: Nothing

Writes the files necessary to create a full stack Genie app.

Genie.Generator.mvc_supportFunction
mvc_support(app_path::String = ".") :: Nothing

Writes the files used for rendering resources using the MVC stack and the Genie templating system.

Genie.Generator.db_supportFunction
db_support(app_path::String = ".") :: Nothing

Writes files used for interacting with the SearchLight ORM.

Genie.Generator.autostart_appFunction
autostart_app(path::String = "."; autostart::Bool = true) :: Nothing

If autostart is true, the newly generated Genie app will be automatically started.