An example React web app for a talk at React Berlin.
See this Gist and the companion React Native app for more info:
https://gist.github.com/peterjmag/2ef39ba5d25f3f1e0008
https://github.com/peterjmag/ReadingListIOS
npm install
npm start
to run the webpack dev server (with React Hot Loader awesomeness!).node server/api-server.js
to run the tiny API server.- Open http://localhost:3000 in your browser.
- If it works, great! Add some links and be happy.
You can also work without the webpack dev server. Just run ./node_modules/webpack/bin/webpack.js
in the project root (or just webpack
if you have webpack installed globally) to generate assets/bundle.js
.
Note that this is intended more for code examples than as an actual distributable app, so the setup isn't perfect (e.g. the fact that you have to run two separate Express servers kinda sucks), and can certainly be improved upon. That said, it should still run fine.
- Add ESLint, clean things up a bit
- Add a production config for webpack
- Do a bunch of stuff to the API server to make it production-ready
- Use something other than NeDB as a database
- Launch a startup that will take over the world