Commit 59178878 by irul

1st commit

0 parents
.DS_Store
.phpintel/
vendor/
composer.lock
RewriteEngine On
RewriteBase /fake-api/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
# Passing Authorization header to PHP’s $_SERVER[‘HTTP_AUTHORIZATION’]
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
# Disable directory browsing
Options -Indexes
# Hide the contents of directories
IndexIgnore *
# Deny access to filenames starting with dot(.)
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
# Deny access to files with defined extensions
<FilesMatch "\.(ini|psd|log|devel|json|lock|phar|example|live|md|sh)$">
Order allow,deny
Deny from all
</FilesMatch>
\ No newline at end of file
# Fake API.
Digunakan sebagai simulasi aplikasi backend (webservice/rest-api/json-rpc) untuk mempercepat pengembangan aplikasi frontend.
---
Untuk digunakan oleh internal OpenSIPKD.
[irul – irul.sylva@gmail.com]
{
"name": "irul/fake-api",
"description": "Fake API.",
"type": "project",
"keywords": ["api", "json-rpc", "rest-api"],
"time": "2020-05-15",
"license": "BSD-4-Clause",
"authors": [{
"name": "Khairul Anwar",
"email": "irul.sylva@gmail.com",
"homepage": "https://iruwl.github.io",
"role": "Developer"
}],
"require": {
"steampixel/simple-php-router": "^0.4.1",
"fguillot/json-rpc": "^1.2",
"fzaninotto/faker": "^1.9"
}
}
No preview for this file type
<?php
// irul @ 20200515
/**
* Make sure to activate: always_populate_raw_post_data = -1 in php.ini
*/
// Autoload files using composer
require_once __DIR__ . '/vendor/autoload.php';
// Use this namespace
use Steampixel\Route;
// Add your first route
Route::add('/', function () {
echo 'Welcome :-)';
});
Route::add('/samsat-banten', function () {
new SamsatBanten();
}, 'post');
// Run the router
$baseUrl = '/';
Route::run($baseUrl);
#!/bin/bash
clear
composer dump-autoload -o
# php -S 127.0.0.1:4000 -t public -c /etc/php/5.6/apache2/php.ini
# php -S 127.0.0.1:4000 router.php
php -S 127.0.0.1:4000
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!