minor updates
This commit is contained in:
@@ -31,9 +31,9 @@ docker run --rm --interactive --tty --volume ./novaconium/:/app composer:latest
|
||||
cp -R novaconium/vendor/4lt/novaconium/skeleton/. .;
|
||||
|
||||
# Edit .env
|
||||
# pwgen -cnsB1v 12 root password
|
||||
# pwgen -cnsB1v 12 mysql user password (need in both config and env)
|
||||
# pwgen -cnsB1v 64 framework key (need in config)
|
||||
# pwgen -cnsB1v 12 # root password
|
||||
# pwgen -cnsB1v 12 # mysql user password (need in both config and env)
|
||||
# pwgen -cnsB1v 64 # framework key (need in config)
|
||||
# Edit novaconium/App/config.php
|
||||
|
||||
docker compose up -d
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Sample Docker Compose
|
||||
services:
|
||||
corxn:
|
||||
image: 4lights/corxn:6.0.0
|
||||
image: 4lights/corxn:8.5.3
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// ini_set('display_errors', 1);
|
||||
|
||||
// Define the base path where the website is running from
|
||||
define('BASEPATH', dirname(__DIR__, 1));
|
||||
define('BASEPATH', dirname(__DIR__));
|
||||
|
||||
// Load Composer's autoload file to handle class autoloading
|
||||
require BASEPATH . '/vendor/autoload.php';
|
||||
|
||||
@@ -56,7 +56,7 @@ class Router {
|
||||
}
|
||||
|
||||
private function getRequestType() {
|
||||
// is the requewst a get or post?
|
||||
// is the request a get or post?
|
||||
if (empty($_POST)) {
|
||||
return 'get';
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Novaconium\Logger;
|
||||
use Novaconium\Session;
|
||||
use Novaconium\MessageHandler;
|
||||
use Novaconium\Database;
|
||||
use Novaconium\Post;
|
||||
use Novaconium\Redirect;
|
||||
use Novaconium\Router;
|
||||
|
||||
$db = null;
|
||||
$post = null;
|
||||
|
||||
// --- Load Config ---
|
||||
if (file_exists(\BASEPATH . '/App/config.php')) {
|
||||
require_once \BASEPATH . '/App/config.php';
|
||||
@@ -11,7 +22,6 @@ require_once \FRAMEWORKPATH . '/src/functions.php';
|
||||
require_once \FRAMEWORKPATH . '/src/twig.php';
|
||||
|
||||
// --- Logging ---
|
||||
use Novaconium\Logger;
|
||||
$log = new Logger(\BASEPATH . $config['logfile'], $config['loglevel']);
|
||||
|
||||
// --- Twig Data Array ---
|
||||
@@ -21,35 +31,29 @@ $data['matomo_url'] = $config['matomo_url'] ?? '';
|
||||
$data['matomo_id'] = $config['matomo_id'] ?? '0';
|
||||
|
||||
// --- Session ---
|
||||
use Novaconium\Session;
|
||||
$session = new Session();
|
||||
$data['token'] = $session->get('token');
|
||||
$data['username'] = $session->get('username');
|
||||
|
||||
// --- Messages ---
|
||||
use Novaconium\MessageHandler;
|
||||
$messages = new MessageHandler($session->flash('messages'));
|
||||
foreach (['error', 'notice'] as $key) {
|
||||
$data[$key] = $messages->showMessages($key);
|
||||
}
|
||||
|
||||
// --- Database ---
|
||||
use Novaconium\Database;
|
||||
if (!empty($config['database']['host'])) {
|
||||
$db = new Database($config['database']);
|
||||
}
|
||||
|
||||
// --- POST Wrapper ---
|
||||
use Novaconium\Post;
|
||||
if (!empty($_POST)) {
|
||||
$post = new Post($_POST);
|
||||
}
|
||||
|
||||
// --- Redirect Handler ---
|
||||
use Novaconium\Redirect;
|
||||
$redirect = new Redirect();
|
||||
|
||||
// --- Router ---
|
||||
use Novaconium\Router;
|
||||
$router = new Router();
|
||||
require_once $router->controllerPath;
|
||||
|
||||
Reference in New Issue
Block a user