--
- Secure
web.json
use Hyper\Application\HyperApp;
require 'hyper/index.php';
new HyperApp("<Name of your app>", "auto");
$customSections = ["hello-section"];
new HyperApp("<Name of your app>", "auto", $customSections);
//TODO: work on manual routing
use Hyper\Application\HyperApp;
require 'Hyper/Index.php';
new HyperApp("<Name of your app>", "auto");
//Put section where you want it to be rendered. Usually layout.php
<h-section type="hello-section"></h-section>
//Put section content from other views
<h-section hello-section></h-section>
Hyper configurations are stored in web.json
or your own JSON
file
To configure a database, add a db
object in the config file web.json
For example:
{
"db": {
"host": "localhost",
"port": 80,
"database": "<dbName>",
"username": "root",
"password": ""
}
}
To turn on/off debug mode set debug
property to json
For example:
{
"debug": true
}