Skip to content

PhoenixRacing/WebApp20

Repository files navigation

WebApp20

Baja web app 2.0

It is recommended to follow the angular style guide written here.

How to install

Install git

On Windows

  1. Download it here. (RECOMMENDED: Keep 'Git Bash' checked in order to install Git Bash). It is recommended to choose 'Use Git from the Windows Command Prompt'
  2. Run git --version in either a command prompt or Git Bash in order to verify git is installed.

On Ubuntu

  1. Run sudo apt-get install git in Terminal.
  2. Run git --version to verify it is installed.

Clone the repo

  1. Open a Terminal, Command Prompt, or Git Bash.
  2. cd to the location where you want to put the 'WebApp20' folder. (Recommended to use cd ~/Documents or mkdir ~/Documents/GitHub; cd ~/Documents/GitHub)
  3. Run git clone https://github.com/PhoenixRacing/WebApp20.

Install node.js

On Windows

  1. Download the installer here.
  2. Run the installer
  3. Open a command prompt.
  4. Run node -v and npm -v in a shell and ensure that some version is printed. (NOTE: shell means Command Prompt, Git Bash, or Terminal).

On Ubuntu/Debian systems

  1. Run curl -sL https://deb.nodesource.com/setup | sudo bash - (install curl with sudo apt-get install curl if needed)
  2. Run sudo apt-get install -y nodejs and sudo apt-get install -y build-essential.
  3. Run node -v and npm -v in a shell and ensure that node's version is greater than 0.10.35 and npm's version is greater than 2.1.17. (NOTE: shell means Command Prompt, Git Bash, or Terminal).
  4. If npm is out of date run sudo npm install -g npm

Install MongoDB

On Windows

  1. Download and run the installer here. Use the 'Complete' installation.
  2. Run mkdir \data\db.
  3. Run mongod to verify that MongoDB is working.

On Ubuntu

  1. Run sudo mkdir -p /data/db.
  2. Follow the instructions here.
  3. Run mongod to verify that MongoDB is working. (You might have to do sudo mongod if that fails, we don't know why).

Install packages

On Windows:

Recommended: Use Git Bash and follow the instructions for Ubuntu.

Otherwise:

  1. Open the 'tools/install.bash' file in the 'WebApp20' directory and copy its contents.
  2. Open Command Prompt
  3. cd into the 'WebApp20' folder.
  4. Paste.

On Ubuntu

  1. Open Terminal and cd into the 'WebApp20' directory.
  2. Run bash tools/install.bash.

Get auth.js

For security reasons, we do not publish auth.js on GitHub. You will have to get the auth.js file from a team lead or teammate. You can ask Sawyer or Radmer for a copy of the file. When you get this file, place it in the WebApp20 folder.

Get AWS config files

For security reasons, we do not publish our AWS configuration files on GitHub. You will have to get a config and a credentials file from a team lead or teammate. You can ask Sawyer for a copy of these files. When you get these files, place them in the folder ~/.aws/. This will allow you to upload photos to our S3 bucket.

Recommended step: Install nodemon

nodemon automatically restarts the project when it notices any changes to files. This is very convenient. If you don't use nodemon, you'll have to manually restart the project each time you want to

  1. Run npm install -g nodemon in Terminal, Git Bash, or Command Prompt. (You may need to add a sudo in front if using Ubuntu).

First time setup

  1. Run the project as detailed under Run the project.
  2. Go to localhost:3000/signup in the browser, and sign up.
  3. Go to the WebApp20 folder in a shell.
  4. Run mongo. You should enter a mongo shell.
  5. Run use olinbaja.
  6. Run db.users.update({}, {"$set":{"admin":true}}).
  7. Run db.users.update({}, {"$set":{"purchaseManager":true}}).

Run the project

  1. Open a shell and run mongod.
  2. Open another shell and cd into the 'WebApp20' directory.
  3. Run nodemon app.js. (Use node instead of nodemon if you didn't install nodemon). (NOTE: On Windows, you may need to do nodemon ~/path/to/app.js if it gives you an error).
  4. Navigate to localhost:3000 in your browser.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •