GithubHelp home page GithubHelp logo

davydhaeyer / silex-simple-rest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vesparny/silex-simple-rest

0.0 1.0 0.0 110 KB

A simple silex skeleton for rest api

License: MIT License

Shell 1.49% PHP 94.98% Perl 3.53%

silex-simple-rest's Introduction

Silex Simple REST Build Status

A simple silex skeleton application for writing RESTful API. Developed and maintained by Alessandro Arnodo.

Continuous Integration is provided by Travis-CI.

Setup

Install as a project via composer:

curl -s http://getcomposer.org/installer | php
php composer.phar create-project vesparny/silex-simple-rest

or just download the tarball from github and install dependencies via composer:

php composer.phar install

Configuration

  • Configure RewriteBase /path/to/app in /web/.htaccess
  • Create a database (an example mysql database is provided in /docs/ folder).
  • Configure database access information in /app/config/dev.json.

Features

Take a look to /src/boot.php to see how does it works.

Every files in the project follows PSR-0 standards.

In order to don't screw up autoloading it's important naming and declaring classes in StudlyCaps.

  • Every route file place in /app/Classes/Routes/ is automatically loaded. (an example Api.php Route class is provided)
  • Same thing for file places in /app/Classes/Business/.
  • /app/config/default.json is overwritten by any configuration you place in /app/config/$env.json.
  • A logging file is created in /app/logs/, every day a new file is created (logging level is configurable).

Run tests

phpunit is required for the tests, place your own in /tests/ folder, following the namespace structure.

phpunit

Used packages

Refer to single package documentation for more accurate support.

"silex/silex": "1.0.*",
"symfony/browser-kit": "2.1.*",
"symfony/css-selector": "2.1.*",
"symfony/finder": "2.1.*",
"symfony/process": "2.1.*",
"monolog/monolog": "1.2.*",
"symfony/validator": "2.1.*",
"igorw/config-service-provider": "1.0",
"doctrine/dbal": "2.2.*"

Contributing

Fell free to contribute, fork, pull request, hack. Thanks!

Author

####Alessandro Arnodo

License

see LICENSE file.

silex-simple-rest's People

Contributors

davydhaeyer avatar kevich avatar vesparny avatar

Watchers

 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.