Sha256: e46c3dd71274fe6ae1317cb0b19faf5d53e61a0e17a682ab43a0468a5a9970ae

Contents?: true

Size: 1.34 KB

Versions: 3

Compression:

Stored size: 1.34 KB

Contents

= Blog

A simple blog.

== Configuration

Edit the configuration files  in conf/* as needed. 

You can also edit the application configuration parameters
in run.rb.

Dont forget to set your name and the password in the 
lib/blog.rb file:

Blog.username = 'your name'
Blog.password = 'your password'

By default this example uses the PostgreSQL backend. If you want to 
use a different backend dont forget to change it for the DEBUG
and LIVE configurations.

== Run

Exec the following command:

$ ruby run.rb

then point your browser to:

http://127.0.0.1:9999

(if you want to change the server address/port, edit the config.rb
file)

Click at 'Login as owner'

enter the password.

And start adding blog entries :)

== Discussion

The bulk of the code is in the directory 'src'. For extra security
the templates reside in the 'src/views' directory and not in the
public directory.

If you want to modify the example it is a nice idea to switch
to debug mode. Just run the application in debug mode
to enable autoreloading of actions/templates and extra
debugging information.

$ ruby run.rb --debug

In debug mode the view files (xhtml/xsl/etc) are automatically
reloaded. The controller classes are also relaoded.

You can also attach to a running instance of the blog application
using irb. Just open a new window and issue the following
command:

$ ruby run.rb --console

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nitro-0.14.0 examples/blog/README
nitro-0.13.0 examples/blog/README
nitro-0.15.0 examples/blog/README