https://github.com/ripeworks/rackem-cgi
CGI Middleware so you can run CGI apps with Rackem.
https://github.com/ripeworks/rackem-cgi
Last synced: about 1 year ago
JSON representation
CGI Middleware so you can run CGI apps with Rackem.
- Host: GitHub
- URL: https://github.com/ripeworks/rackem-cgi
- Owner: ripeworks
- Created: 2013-07-05T17:17:09.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-23T01:34:07.000Z (over 12 years ago)
- Last Synced: 2025-03-29T03:32:05.890Z (about 1 year ago)
- Language: PHP
- Size: 164 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rack'em CGI
Use these to serve CGI compliant applications via Rack'em.
## Example
```php
return \Rackem::run(new \Rackem\Php(null, __DIR__));
```
This will serve the current directory as a PHP CGI application. The first parameter can be used to pass in a Rack'em application so you can also use this as a middleware.
## Web Applications
This is a great way to run some PHP applications locally (for development), so I included a `Rewritable` app to do just that.
```php
return \Rackem::run(new \Rackem\Rewritable(null, __DIR__.'/wordpress'));
```
_This will serve a Wordpress site that is located in `./wordpress/`_
The Rewritable class can also serve other web applications like Drupal etc.