GithubHelp home page GithubHelp logo

taiebmd / prestissimo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lukasolson/prestissimo

0.0 2.0 0.0 101 KB

Lightweight PHP/MySQL/JSON/REST framework to get something up and running quickly.

prestissimo's Introduction

PRESTissimo

PRESTissimo is a minimal framework for building APIs utilizing PHP, MySQL and JSON in a RESTful manner.

Quick Start

PRESTissimo is made for getting up and started as quickly as possible. Because of this, there are very few configuration options. Here's how to get started:

  1. Upload everything to your server that already has PHP and MySQL installed.
  2. Open utils/db_utils.php and modify username, password, and database_name to match your MySQL username/password and database.
  3. Open router.php and modify the base_url to the local URL where your API will reside (e.g., for http://example.com/api/, it would be "/api/").
  4. Open controllers/example_controller.php to see an example controller.

Note that the name of the controller (both the file name and the class name inside the file) is what defines the URL of the resource. For example, the example controller is named example_controller.php, and has a matching class name of ExampleController, so the URL of the resource will be http://your_domain.com/example.

A get request will invoke the get($params, $data) method on the controller, a post request will invoke the post($params, $data) method, and so on for put and delete.

Take the following example request: GET http://your_domain.com/something/1/2/3?a=1&b=2

The framework will attempt to include controllers/something_controller.php and create an instance of SomethingController, invoking the get() method with the following arguments:

  • $params: array(1, 2, 3)
  • $data: array("a" => 1, "b" => 2)

prestissimo's People

Contributors

lukasolson avatar

Watchers

James Cloos avatar Mohamed TAIEB avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.