kerisy / framework
A web framework on the swoole
Installs: 147
Dependents: 2
Suggesters: 0
Security: 0
Stars: 23
Watchers: 11
Forks: 11
Open Issues: 2
Requires
- php: >=7
- ext-apcu: >=4.0.7
- ext-swoole: >=1.7.19
- guzzlehttp/guzzle: ^6.1
- jenssegers/blade: ^1.0
- monolog/monolog: ~1.0
- mtdowling/cron-expression: ^1.1
- php-amqplib/php-amqplib: 2.6.*
- predis/predis: v1.1.0
- propel/propel: 2.*
- squizlabs/php_codesniffer: ^2.6
- symfony/console: ^2.7
- symfony/event-dispatcher: 2.*
- symfony/process: ^3.1
This package is not auto-updated.
Last update: 2024-12-21 19:31:54 UTC
README
#####Kerisy use swoole http server.
web server run command : php kerisy server start
rpc server run command : php kerisy rpcserver start
job server run command : php kerisy jobserver start (first import jobs.sql)
#####use nginx http server
- add "index.php", write follow code:
<?php
require __DIR__ . '/vendor/autoload.php';
ini_set('display_errors', 1);
defined('APPLICATION_PATH') || define('APPLICATION_PATH', __DIR__ . '/application/');
defined('CONFIG_PATH') || define('CONFIG_PATH', APPLICATION_PATH . '/config/');
defined('KERISY_ENV') || define('KERISY_ENV', getenv('KERISY_ENV')?:'development');
defined('CLI_MODE') || define('CLI_MODE', PHP_SAPI === 'cli' );
$app = new \Kerisy\Core\Application\Web();
$app->webHandle();
- nginx conf
server {
listen 80;
server_name rpc.test;
root /mnt/hgfs/code/kerisy_rpc;
access_log /var/log/nginx/kerisy_rpc.access.log;
error_log /var/log/nginx/kerisy_rpc.error.log;
index index.php index.html;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location ~ ^/(images|video|static)/ {
root /mnt/hgfs/code/kerisy_rpc;
#expires 30d;
}
}