Initial import

This commit is contained in:
flash 2022-07-04 00:16:43 +00:00
commit 04ab99feed
9 changed files with 78 additions and 0 deletions

0
.debug Normal file
View File

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/the

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lib/index"]
path = lib/index
url = git@github.com:flashwave/index.git

25
LICENCE Normal file
View File

@ -0,0 +1,25 @@
BSD 2-Clause License
Copyright (c) 2022, flashwave <me@flash.moe>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Ryouko
Ryouko (snip.flashii.org) is a hoster for code and text snippets with edit history.

1
lib/index Submodule

@ -0,0 +1 @@
Subproject commit 3eb650c246c8932722da203ca75a0a54c5c69ef9

24
public/index.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace Ryouko;
use Index\StringBuilder;
use Index\Data\DbType;
use Index\Http\HttpFx;
require_once __DIR__ . '/../ryouko.php';
$router = new HttpFx;
$router->use('/', function($response) {
$response->setPoweredBy('Ryouko+Index');
});
$router->get('/', function() {
$sb = new StringBuilder;
$sb->appendLine('<!doctype html>');
$sb->appendLine('<title>Flashii Labs Snippets</title>');
$sb->appendLine('Coming sooner than the actual labs, I can assure you that.');
return $sb;
});
$router->dispatch();

20
ryouko.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace Ryouko;
use Index\Autoloader;
use Index\Environment;
//use Index\Data\MariaDB\MariaDBBackend;
//use Index\Data\MariaDB\MariaDBConnectionInfo;
define('RYK_STARTUP', microtime(true));
define('RYK_ROOT', __DIR__);
define('RYK_DEBUG', is_file(RYK_ROOT . '/.debug'));
define('RYK_DIR_SRC', RYK_ROOT . '/src');
define('RYK_DIR_LIB', RYK_ROOT . '/lib');
define('RYK_DIR_PUB', RYK_ROOT . '/public');
//define('RYK_DIR_CFG', RYK_ROOT . '/config');
require_once RYK_DIR_LIB . '/index/index.php';
//Autoloader::addNamespace(__NAMESPACE__, RYK_DIR_SRC);
Environment::setDebug(RYK_DEBUG);