Simple React web application, designed to synchronise and display content from Drupal via PouchDB and RELAXed.
- Install Drupal 8 PoC and CouchDB.
- Create some content and replicate it into CouchDB.
- Customise
src/config.js
with the access details for your CouchDB server. - Install Node.js, version 5.x or 4.2.x. If you're using Homebrew
on OS X, this can be accomplished with a simple
brew install node
- Run
npm install
to install required dependencies. This will take a while. - Run
npm install -g nodemon
to install Nodemon. - Run
npm run start
to compile the app and host it on a bundled server. This server supports hot reloading, so any code changes should be reflected automatically without having to reload the entire application. - Open http://localhost:1849 in a browser to view the app.
- Do installation steps 1-6, if you did not do so already.
- Run
npm run test
to run the test suite.
While developing, you can use npm run dev
in place of npm run start
to configure the app in development mode.
You can also run npm run test:dev
in a separate shell to automatically
run the tests whenever the code changes.
The React Developer Tools is a browser plugin for Firefox or Chrome that will let you peek into React component state, very helpful while debugging.