All Projects → johanvanderkuijl → CakePHP-react

johanvanderkuijl / CakePHP-react

Licence: other
No description, website, or topics provided.

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects
Batchfile
5799 projects
ApacheConf
554 projects

CakePHP-react example

Example how to use a CakePHP 3.x application as backend together with a React frontend as found on https://facebook.github.io/react/docs/tutorial.html

Installation

Make sure you have Composer installed and configured.

  1. Check out this source code to cakephp-react (lowercase!)

    cd your-webroot-directory
    git clone https://github.com/Rubyan/CakePHP-react.git cakephp-react
    
  2. Go to the backend directory

    cd cakephp-react
    cd backend
    
  3. Run composer install.

  4. Create a database with the following settings:

     'database' => 'my_app',
     'username' => 'my_app',
     'password' => 'secret',
    
  5. Read and edit config/app.php and setup the 'Datasources' and any other configuration relevant for your application.

  6. run the migration. This will create the database table.

       bin/cake migrations migrate
    

Backend

Test the backend with the CakePHP interface: http://localhost/cakephp-react/backend/comments

Frontend

Test the frontend with the React interface http://localhost/cakephp-react/react/public

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].