acidjazz/tryg
最新稳定版本:v0.4.0
Composer 安装命令:
composer require acidjazz/tryg
包简介
Minimal PHP Framework
关键字:
README 文档
README
A Minimal PHP/node MVC framework
features
- Visual debugger

- Complete Pug support
- Complete Stylus support
- Global configuration, parameters available in PHP, Stylus, and Pug
- API endpoint assistance
- Much more I will list later
what?
tryg is a minimal PHP framework named after Trygve Reenskaug, the inventor of the MVC structure. tryg uses Pug for templating and Stylus for CSS preprocessing, their native versions via sockets.
installation
php ~/composer.phar require acidjazz/tryg
- Copy the bundled setup template
cp -rp vendor/acidjazz/tryg/site .
- Copy the provided package.json to install the required node modules, then use npm to install them
cp -rp vendor/acidjazz/tryg/package.json .
npm install
- Point your web server to the site/pub/ folder you've copied as the root, you're done!
Nginx setup
Replace /var/www/tryg/site/pub with the location of your setup template
server { listen 80; root /var/www/tryg/site/pub; index index.php; server_name tryg; location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php; } } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; # dev env settings fastcgi_param PHP_VALUE "short_open_tag=on \n display_errors=off \n error_reporting=E_ALL"; # prod env settings # fastcgi_param PHP_VALUE "short_open_tag=on \n display_errors=off \n error_reporting=E_ALL"; } }
Apache setup
Create a .htaccess in your setup template root folder and make sure mod_rewrite is activated
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php
dev notes
refresh our test setup using tryg as a vendor
sudo pkill node;php ~/composer.phar update;rm -rf site/pub/; cp -rp vendor/acidjazz/tryg/site/ site
统计信息
- 总下载量: 171
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-19