You can read article about it:
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:
curl https://install.meteor.com/ | sh
npm run build
in the client
folder. The files will land in client/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 client/app/asteroid/asteroid.js
file.
I use Asteroid here as my DDP client.
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.
If you have any suggestions, go ahead!
Check out tests. Go to the client
and tun npm test
.