Baja web app 2.0
It is recommended to follow the angular style guide written here.
- 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'
- Run
git --versionin either a command prompt or Git Bash in order to verify git is installed.
- Run
sudo apt-get install gitin Terminal. - Run
git --versionto verify it is installed.
- Open a Terminal, Command Prompt, or Git Bash.
cdto the location where you want to put the 'WebApp20' folder. (Recommended to usecd ~/Documentsormkdir ~/Documents/GitHub; cd ~/Documents/GitHub)- Run
git clone https://github.com/PhoenixRacing/WebApp20.
- Download the installer here.
- Run the installer
- Open a command prompt.
- Run
node -vandnpm -vin a shell and ensure that some version is printed. (NOTE: shell means Command Prompt, Git Bash, or Terminal).
- Run
curl -sL https://deb.nodesource.com/setup | sudo bash -(install curl withsudo apt-get install curlif needed) - Run
sudo apt-get install -y nodejsandsudo apt-get install -y build-essential. - Run
node -vandnpm -vin 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). - If npm is out of date run
sudo npm install -g npm
- Download and run the installer here. Use the 'Complete' installation.
- Run
mkdir \data\db. - Run
mongodto verify that MongoDB is working.
- Run
sudo mkdir -p /data/db. - Follow the instructions here.
- Run
mongodto verify that MongoDB is working. (You might have to dosudo mongodif that fails, we don't know why).
Recommended: Use Git Bash and follow the instructions for Ubuntu.
Otherwise:
- Open the 'tools/install.bash' file in the 'WebApp20' directory and copy its contents.
- Open Command Prompt
cdinto the 'WebApp20' folder.- Paste.
- Open Terminal and
cdinto the 'WebApp20' directory. - Run
bash tools/install.bash.
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.
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.
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
- Run
npm install -g nodemonin Terminal, Git Bash, or Command Prompt. (You may need to add asudoin front if using Ubuntu).
- Run the project as detailed under
Run the project. - Go to
localhost:3000/signupin the browser, and sign up. - Go to the
WebApp20folder in a shell. - Run
mongo. You should enter a mongo shell. - Run
use olinbaja. - Run
db.users.update({}, {"$set":{"admin":true}}). - Run
db.users.update({}, {"$set":{"purchaseManager":true}}).
- Open a shell and run
mongod. - Open another shell and
cdinto the 'WebApp20' directory. - Run
nodemon app.js. (Usenodeinstead ofnodemonif you didn't installnodemon). (NOTE: On Windows, you may need to donodemon ~/path/to/app.jsif it gives you an error). - Navigate to
localhost:3000in your browser.