werc (framework)
Werc - A sane web anti-framework developed and used by 9front comity.
installation
Install by cloning it with hg from https://code.9front.org/hg/werc to a suitable location.
configuration
In the directory werc/sites create a subdirectory with the name of your site. The name must match the case statement from rc-httpd/select-handler configuration. If you have a domain, use a domain, if you're accessing through IP only, let the name be the IP.
In your site directory, create a subdirectory UNDERSCOREwerc. In there, create a file config.
masterSite=offbeatpursuit.com
siteTitle='WLOG'
siteSubTitle='something different'
meta_description='A collection of notes on various topics.'
conf_hide_paths blog/src paste/src
MasterSite definition is required, the rest is optional and will pull from your config or master config in werc/lib if missing. Be careful, the defaults are for the 9front sites, which are included and can be referenced, but should be changed.
Now configure and style according to the documentation.
development
TODO - development notes for werc itsefs
app development
As deduced from experimenting
basic structure
Apps are located in werc/app/name folder.
App should contain app.rc, which will get included. The file should contain one or both of the following functions:
# gets called if it is included in _werc/config file - is used to do preparations (like setting variables befor running the app)
fn conf_enable_APPNAME{
# do preparations - set paths and variables (gets executed in the called directory)
conf_enable_app APPNAME
}
# gets called if conf_enable_app APPNAME is included in _werc/config file - runs the app
fn APPNAME_init{
# do app stuff - gets executed in werc directory
}