This site is built with Viewi itself. It is experimental and still in development. If you see any bugs please do not hesitate and open an issue or DM me on Twitter.

Production Build

To make your application production ready you need to make these steps:

  • Ensure that PageEngine::DEV_MODE is set to false
  • Recommended (but not required) to set PageEngine::MINIFY to true
  • Optionally you can set PageEngine::COMBINE_JS to true

Then you need to build your app:

// ensure to include autoload file
require_once __DIR__ . '/vendor/autoload.php';

// get the config for renderer    
$config = require($configFile);

// get the public config
$publicConfig = require($publicConfigFile);

// include routes
require 'path/to/routes';

// call init
App::init($config, $publicConfig);

// call compile
App::getEngine()->compile();

And that’s it.