Contenticious

How to deploy Contenticious pages

Let's say you're done. You finished writing a few documents and you're cool with the site structure. Now you need to publish that content, so everyone in the web can look at it. Easy!

Generate static HTML

The following command generates static HTML pages. After it's done you'll find your .html files in the dump directory including everything from public.

$ ./webapp.pl dump
dumping everything to /Users/memowe/Desktop/foo/dump ...
...
done!

Just upload it to your web hoster. Done. :-)

Using hypnotoad as a production server

Since Contenticious is a Mojolicious app, you can use Mojolicious' popular production server hypnotoad with Contenticious:

$ hypnotoad webapp.pl

Check http://localhost:8080, it should look like the simple daemon version. To stop hypnotoad, execute it with the --stop option:

$ hypnotoad --stop webapp.pl

Use your contenticious config file to configure hypnotoad:

{
    ...
    cached      => 0,

    // production server configuration
    hypnotoad   => {
        listen  => ['http://*:3000'], 
        workers => 10,  
        proxy   => 1,
    },
}

Maybe you want to read the deployment section of the excellent Mojolicious cookbook to learn more. Or read more about hypnotoad.

Advanced methods

There's a way to include Contenticious in your Mojolicious web apps. It's pretty straightforward with the mount plugin. There's a test for it in Contenticious' test suite.