Giter Site home page Giter Site logo

zero2012 / framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kerisy-php/framework

0.0 2.0 0.0 2.04 MB

Kerisy - A high performance web framework written in PHP 7.x (php-fpm / libevent / swoole / reactphp / workman)

Home Page: http://www.kerisy.com/

PHP 100.00%

framework's Introduction

#Kerisy - A web framework written in PHP 7.0+

#####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;
        }
}

framework's People

Contributors

dolaris avatar huagelong avatar iceqi avatar kaihuiwang avatar tubaimo avatar zhangjf108 avatar zoujiaqing avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.