Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/annimon-tutorials/php-unframework-template
Framework-less template for simple sites. Source code for tutorial
https://github.com/annimon-tutorials/php-unframework-template
fastroute framework-less php tutorial twig
Last synced: 1 day ago
JSON representation
Framework-less template for simple sites. Source code for tutorial
- Host: GitHub
- URL: https://github.com/annimon-tutorials/php-unframework-template
- Owner: annimon-tutorials
- License: mit
- Created: 2020-11-24T17:50:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-24T18:51:00.000Z (about 4 years ago)
- Last Synced: 2023-10-27T21:31:38.693Z (about 1 year ago)
- Topics: fastroute, framework-less, php, tutorial, twig
- Language: PHP
- Homepage: https://annimon.com/article/3959
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php unframework template
Fast and lightweight framework-less template for simple sites. Uses [FastRoute](https://github.com/nikic/FastRoute), [Twig](https://twig.symfony.com/) and [Pimple](https://pimple.symfony.com/).
Demo: https://projects.annimon.com/
## Requirements
php 7.4+
## Install
```bash
composer install
chmod -R 777 cache
cd src && npm install
npm run dist
```Nginx config
```nginx
server {
listen 80;
listen [::]:80;
listen 443 ssl;root /var/www/app/public;
index index.php index.html index.htm;
server_name app.site;
autoindex off;location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~* ^.+\.(svg|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 30d;
}
}
```Apache config
```xml
ServerName app.site
ServerAdmin [email protected]
DocumentRoot /var/www/app/public
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
```