GithubHelp home page GithubHelp logo

duataud / react-redux-webpack-meteor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliancwirko/react-redux-webpack-meteor

0.0 2.0 0.0 26 KB

React demo app with Webpack, Redux and Meteor as a backend only

JavaScript 76.46% CSS 16.54% HTML 7.00%

react-redux-webpack-meteor's Introduction

Demo: React, Webpack, Redux and Meteor as a backend only

This is just a standard React - Redux app based on my boilerplate. It uses Meteor, but only as a backend. So you need to run both apps.

This is really awesome that I needed only one file to create realtime backend for a custom React app! Thanks to Meteor!

How to start:

  • if you don't have Meteor install it: curl https://install.meteor.com/ | sh
  • clone the repo
  • go to the meteor-backend folder and run npm install and then meteor -p 9000
  • go to the react-client-app and in another terminal window run npm install and then npm start
  • you can bundle React app and use it as a standard css, html and js static files it will still be able to connect to the Meteor backend which should be running (hosted somewhere). You can bundle the files by running: npm run build in the react-client-app folder. The files will land in react-client-app/public folder. It allows you to host your client files on a very basic hosting which can serve static files. Also you can use one Meteor instance as a backend for many React apps. Of course it should be used wisely ;)

The React app will start on localhost:3000 and it will connect to the Meteor backend on localhost:9000. (Meteor backend isn't secured - just demo).

For production you should be able to bundle client app and use static files from public folder. Read more here. You also need to host your Meteor app somewhere and you should change connection host in react-client-app/app/asteroid/asteroid.js file.

I use Asteroid here as my DDP client.

Why?

I like Meteor as a backend and for DDP, but not so much for its React integration and build system. It is good, but I have a feeling that it's missing something. It isn't elastic. I like Webpack and all tools around it. I also like separation and Redux usage here. I can use my custom React configuration with Meteor backend and still have my realtime updates where I want. What is more important I can configure backend in minutes. Also with such structure I am able to switch to another backend very quickly.

But first of all this is also demo repo for blog post which will be published on my blog soon.

If you have any suggestions, go ahead!

Tests (not complete)

Check out tests. Go to the react-client-app and tun npm test.

react-redux-webpack-meteor's People

Contributors

juliancwirko avatar

Watchers

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