Giter VIP home page Giter VIP logo

reavel's Introduction

Reavel

Develop, build and Run react + laravel on one server without using laravel mix

Details

This setup contains Laravel 5.8.*(check in composer.json) and react 16.8.4(check in package.json)

The source files for reactJs are located in the /src folder.

Setup

Follow this guide to setup project:

  1. Clone repo with the command - git clone https://github.com/emekadev/reavel.git
  2. Copy the .env.example file to a .env file in the same directory
  3. Run npm install
  4. Run composer install && composer update

Your project is now ready to be served.

Compile React

Use the command npm start to compile react.

This setup makes use of HMR so the App will be updated whenever you make changes to the react/javascript files

Start Laravel

You can start up your php server with php artisan serve then go to http://localhost:8000 on your browser

Note: Make sure you run npm start before firing up your php development server so that laravel can have access to the compiled react/javascript files.

When your app is ready for deployment, run npm run build and change APP_ENV in your env file to 'production'. Laravel will now read the built version of your react app and can be deployed to a server together with the app.js file in the /public.js/ folder.

If you are advanced user feel free to clone the repo and modify to suit your personal needs

TODO:

  • Create a laravel helper to detect host for asset instead of using if/else

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.