This project was bootstrapped with Create React App.
Splitting a WebApp into multiple layers has some advantages:
- a better separation of concerns
- the layer implementation can be replaced
- the UI layer can be hard to test. By moving the logic to other layers, it becomes easier to test.
This WebApp can store and access data in 2 separate "backends":
- The browser's LocalStorage (default option)
- REST API (serving dummy_data/db.json via json-server)
After cloning the repo, you can either use Yarn (faster) or NPM (old-school).
# Install dependencies
yarn
# Serve the site on localhost:3000
yarn start
# In a second terminal, start the json-server (only needed for the REST API backend)
yarn server# Install dependencies
npm install
# Serve the site on localhost:3000
npm start
# In a second terminal, start the json-server (only needed for the REST API backend)
npm run server