acidjazz/tryg 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acidjazz/tryg

最新稳定版本:v0.4.0

Composer 安装命令:

composer require acidjazz/tryg

包简介

Minimal PHP Framework

README 文档

README

A Minimal PHP/node MVC framework

Latest Stable Version Total Downloads Latest Unstable Version License Join the chat at https://gitter.im/acidjazz/tryg

features

  • Visual debugger 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

  1. Install Composer
  2. Install the specified Packagist acidjazz/tryg
php ~/composer.phar require acidjazz/tryg
  1. Copy the bundled setup template
cp -rp vendor/acidjazz/tryg/site .
  1. 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
  1. 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
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-19