-
Notifications
You must be signed in to change notification settings - Fork 5
Standing up the oneleif Website Application
This guide is to show new developers how to run the React front end application. The oneleif website is a generated CRA (create-react-app).
If you do not have the repository on your machine, you will need to clone the repository. You can do this by running the command:
git clone https://github.com/oneleif/olWebsite-React.git
Currently you will need certain permissions to make pull requests, feel free to ask in the #oneleif-website channel in our discord server to get permissions. If not you will need to fork the repository.
Linux/mac you will want to use a package manager. For an example, see this guide: https://nodejs.org/en/download/package-manager/
Windows you will want to use the installer, see this guide: https://www.liquidweb.com/kb/install-react-js-windows/
Check that you have installed node correctly by running: node -v
Check that you have installed npm correctly by running: npm -v
At this point we are extremely close to standing up the application. All you need to do is cd into the olWebsite-React repository (where the package.json lives) and simply run npm install
.
This will generate the node_modules directory from the dependencies defined in the package.json. The node_modules are ignored (by adding it to our git.ignore file) since we only want to have it locally.
This link is a great resource if you'd like more information about this step.
Well we're finally here, to stand up the application you need to be in the same repository as the package.json. All you will need to do is run the following command: npm start
Now, open your favorite browser (Chrome, Firefox, etc) and go to the following URL: localhost:3000
and congratulations on standing up the oneleif website!