2017 © Pedro Peláez
 

library jolt

Jolt Framework, a PHP micro framework

image

jolt/jolt

Jolt Framework, a PHP micro framework

  • Friday, November 4, 2016
  • by freekrai
  • Repository
  • 3 Watchers
  • 28 Stars
  • 477 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Jolt

Jolt is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs., (*1)

Jolt takes some inspiration from ExpressJS., (*2)

Jolt is not a full featured MVC framework, it is built to be a micro framework that handles routing and carries some basic template rendering. Feel free to use your own template engine such as Twig instead., (*3)

You can see more info at the Jolt wiki:, (*4)

For database, I recommend Idiorm and Paris, (*5)

If you don't want to use Composer, then you can use the autoloader., (*6)

If you're looking for the older version of Jolt, you can find it here in the legacy branch of the repo., (*7)

Requirements

  • PHP 7+

Getting Started

Install

You may install the Jolt Framework with Composer (recommended) or manually., (*8)

Read how to install Jolt., (*9)

Hello World Tutorial

A typical PHP app using Jolt will look like this., (*10)

If you didn't install Jolt via Composer, then use the following to load Jolt:, (*11)

```php get('/hello/:name', function ($name) use ($app){ echo "Hello, $name"; }); ``` Run the Jolt application: ```php $app->listen(); ``` ### Setup your web server #### Apache Ensure the `.htaccess` and `index.php` files are in the same public-accessible directory. The `.htaccess` file should contain this code: RewriteEngine On # Some hosts may require you to use the `RewriteBase` directive. # If you need to use the `RewriteBase` directive, it should be the # absolute physical path to the directory that contains this htaccess file. RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L] #### Nginx The nginx configuration file should contain this code (along with other settings you may need) in your `location` block: try_files $uri $uri/ /index.php?$args; This assumes that Jolt's `index.php` is in the root folder of your project (www root). #### HipHop Virtual Machine for PHP Your HipHop Virtual Machine configuration file should contain this code (along with other settings you may need). Be sure you change the `ServerRoot` setting to point to your Jolt app's document root directory. Server { SourceRoot = /path/to/public/directory } ServerVariables { SCRIPT_NAME = /index.php } VirtualHost { * { Pattern = .* RewriteRules { * { pattern = ^(.*)$ to = index.php/$1 qsa = true } } } } #### lighttpd #### Your lighttpd configuration file should contain this code (along with other settings you may need). This code requires lighttpd >= 1.4.24. url.rewrite-if-not-file = ("(.*)" => "/index.php/$0") This assumes that Jolt's `index.php` is in the root folder of your project (www root). #### IIS Ensure the `Web.config` and `index.php` files are in the same public-accessible directory. The `Web.config` file should contain this code: system.webServer /system.webServer , (*12)

Documentation

https://github.com/freekrai/jolt/wiki/usage, (*13)

How to Contribute

Pull Requests

  1. Fork the Jolt Framework repository
  2. Create a new branch for each feature or improvement
  3. Send a pull request from each feature branch to the develop branch

It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually., (*14)

The Versions

04/11 2016

dev-master

9999999-dev http://github.com/freekrai/Jolt

Jolt Framework, a PHP micro framework

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

rest microframework router

26/02 2014

dev-develop

dev-develop http://github.com/freekrai/Jolt

Jolt Framework, a PHP micro framework

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

rest microframework router