Coder Social home page Coder Social logo

fony's Introduction

fony-php

A Rapid development PHP API framework

Welcome to Fony API PHP framework. The whole idea of this project is to allow the fast development of APIs or PoC over data definitions.

Basic Installation

  1. Initialize your project using Composer:
$ composer init
  1. Add the fony dependency:
$ composer require geekcow/fony
  1. Add the installation script into the composer.json file:
  "scripts": {
     "setup-fony": "Geekcow\\Fony\\Installer\\Setup::init"
  }
  1. Proceed to the installation script:
$ composer run-script setup-fony

Requirements:

Currently Fony API has support for apache and mysql. However there is work in progress for nginx and multiple DBMS (via dbCore)

Also need to have installed mod_rewrite module for Apache

Additionally, need to have the following changes in your directory configuration for your virtual server in Apache:

  <Directory /var/www/yourfolderlocationforyourproject>
      Options FollowSymLinks
      AllowOverride All
      Require all granted
  </Directory>

Note we removed the Indexes option from the directory, in order to not display the tree view.

PHP Built-in server

You can now run a local instance of your built API using a shell command in your root folder

$ ./fony-serve.sh {PORT}

The default port is 8080 but you can customize your own port

If you cannot execute the shell command, you can manually use the php command to serve your own application. You need to be aware as Fony overrides the URL requests, you need to use the custom router for the built-in PHP server. The router is included as a hidden file as .router.php in your root folder.

$ php -S localhost:8080 .router.php

Docker

There is some work creating a docker image to host your Fony implementation. That will be available soon.

Notes:

June 2020: There is still a lot of work to do.

  • Unit tests are not done
  • Tooling is still in progress
  • I want to add a sample of a complete implementation in the Installer.
  • Wiki only has titles.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

fony's People

Contributors

oleche avatar

Stargazers

 avatar

Watchers

James Cloos 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.