A React Address Book example for the UTS Software Development Studio
Make sure you're using Mac/Linux. Many of the npm dependencies for this project don't play nicely with Windows.
Make sure you have Node Version Manager (nvm) installed.
Run nvm install 5.11
to install the latest version of Nodejs. You only need to do this once.
Once you've cloned this repository locally, run npm install
. This will grab all of the external dependencies for this project. From time to time you may need to run this again.
To start the server in development mode, use npm run dev
. The server will start on port 8080. You shouldn't need to restart the server in this mode even if you make changes, as the server will update as you save. Some functionality things will even update without you having to refresh. If you run into any issues though, it might be a good idea to refresh the page or restart the server.
You may notice that styles appear to jump when you load the page in development mode. This is because styles are injected into the page by the JavaScript bundle to make hot reloading of styles possible. Production mode, on the other hand, does not do this.
npm run prod
will start the server in production mode. This slower and won't automatically reload, but makes some optimisations, such as separating out the CSS into a separate file, and minifying the JavaScript bundle.