SMUM React Development Setup
- Install npm and nodejs: https://nodejs.org/en/.
- Run command "git clone https://github.com/UnconditionedLife/smum.git". Run this command in the directory you want SMUM files to reside in.
- Run command "git checkout react-smum". This fetches the react dev code that we currently have.
- Run command "npm install". Here npm (our package management system) reads the file "package.json" (which contains a list of dependencies in our repo) and fetches all dependencies that our code has. This is very similar to a system like maven in Java or pip in Python.
- Run command "npm run build". This packages our react code into static HTML, which we then include in our main index.html file. After making a code change, to see it populate, you need to run this command.
- Run command "npm start". This starts an express server, with the source for the server start in "index.js".
- Your application should be running at http://localhost:3000.
Notes:
- If you get an fsevents error while running "npm install" on a Mac, you can ignore this error and proceed forward with the steps.
- If the install continues to fail due to permissions issues, also try removing the node_modules directory (run command "rm -rf node_modules").
- If the port 3000 is in use, open the file index.js (in the root of the repo) and edit the port number to 3001.