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 --version
in either a command prompt or Git Bash in order to verify git is installed.
- Run
sudo apt-get install git
in Terminal. - Run
git --version
to verify it is installed.
- Open a Terminal, Command Prompt, or Git Bash.
cd
to the location where you want to put the 'WebApp20' folder. (Recommended to usecd ~/Documents
ormkdir ~/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 -v
andnpm -v
in 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 curl
if needed) - Run
sudo apt-get install -y nodejs
andsudo apt-get install -y build-essential
. - Run
node -v
andnpm -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). - 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
mongod
to verify that MongoDB is working.
- Run
sudo mkdir -p /data/db
. - Follow the instructions here.
- Run
mongod
to verify that MongoDB is working. (You might have to dosudo mongod
if 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
cd
into the 'WebApp20' folder.- Paste.
- Open Terminal and
cd
into 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 nodemon
in Terminal, Git Bash, or Command Prompt. (You may need to add asudo
in front if using Ubuntu).
- Run the project as detailed under
Run the project
. - Go to
localhost:3000/signup
in the browser, and sign up. - Go to the
WebApp20
folder 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
cd
into the 'WebApp20' directory. - Run
nodemon app.js
. (Usenode
instead ofnodemon
if you didn't installnodemon
). (NOTE: On Windows, you may need to donodemon ~/path/to/app.js
if it gives you an error). - Navigate to
localhost:3000
in your browser.