PHPackages                             crane/crane - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. crane/crane

ActiveLibrary[Framework](/categories/framework)

crane/crane
===========

Crane - slim and secure

v0.2.9(8mo ago)262MITPHPPHP &gt;=7.0.0

Since Jan 8Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/phrenotype/crane)[ Packagist](https://packagist.org/packages/crane/crane)[ RSS](/packages/crane-crane/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (10)Dependencies (1)Versions (20)Used By (0)

Crane
=====

[](#crane)

[![github stars](https://camo.githubusercontent.com/dbb858dd3e0a68c37c2c235bcfe06c2e8c24ac4dcaf4358c797726bfb25f7389/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706872656e6f747970652f6372616e653f7374796c653d736f6369616c)](https://camo.githubusercontent.com/dbb858dd3e0a68c37c2c235bcfe06c2e8c24ac4dcaf4358c797726bfb25f7389/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706872656e6f747970652f6372616e653f7374796c653d736f6369616c)[![packagist stars](https://camo.githubusercontent.com/69cbb91559afb143c6c36244367b300def3941e78e410023cf551e69e0058c9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6372616e652f6372616e65)](https://camo.githubusercontent.com/69cbb91559afb143c6c36244367b300def3941e78e410023cf551e69e0058c9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6372616e652f6372616e65)[![license](https://camo.githubusercontent.com/1f0503b58fa600895521799dee985a691786be3aeae44c95b451e561a97b3805/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706872656e6f747970652f6372616e65)](https://camo.githubusercontent.com/1f0503b58fa600895521799dee985a691786be3aeae44c95b451e561a97b3805/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706872656e6f747970652f6372616e65)[![contributors](https://camo.githubusercontent.com/7be889d31f2e6fe8083187603b14f5adc1cb90a9d73b55136a28b98c1cfe87b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f706872656e6f747970652f6372616e65)](https://camo.githubusercontent.com/7be889d31f2e6fe8083187603b14f5adc1cb90a9d73b55136a28b98c1cfe87b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f706872656e6f747970652f6372616e65)[![contributors](https://camo.githubusercontent.com/2736b764d1eccd4abe696b07fd7bc5b5b2b297eb4195b490a836a0f906bb6b23/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f706872656e6f747970652f6372616e65)](https://camo.githubusercontent.com/2736b764d1eccd4abe696b07fd7bc5b5b2b297eb4195b490a836a0f906bb6b23/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f706872656e6f747970652f6372616e65)[![downloads](https://camo.githubusercontent.com/aaa0f23561b76c788d213d31fdfb648a209f7b51d5ee633dcca74e929bbb3aba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6372616e652f6372616e65)](https://camo.githubusercontent.com/aaa0f23561b76c788d213d31fdfb648a209f7b51d5ee633dcca74e929bbb3aba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6372616e652f6372616e65)

Quick Start Guide: Routing HTTP Requests in Crane PHP Framework
===============================================================

[](#quick-start-guide-routing-http-requests-in-crane-php-framework)

Introduction
------------

[](#introduction)

Crane is a lightweight and secure PHP framework designed for minimalists who prioritize security. It can run in any hosting environment and provides a simple way to route HTTP requests. This guide will walk you through the basics of setting up routes, handling requests and responses, and using middleware.

Installation
------------

[](#installation)

First, install Crane via Composer:

```
composer require crane/crane
```

Configuration
-------------

[](#configuration)

Create a `config.php` file in your project root to store environment variables (optional but recommended):

```
