This project was built in the Ubuntu Xenial 16.04 LTS Linux environment, and was built on
- Node.js v8.9.1+
- ExpressJS NPM package v4.16.2+
- MongoDB Official Driver NPM package v2.2.33+
- Navigate to the util/scripts folder
-
cd util/scripts
- Run the setup script
-
chmod +x setup.sh && bash setup.sh
- In a "main" directory of your choice (i.e.
cd
intoDesktop
orDocuments
), you can acquire the latest Node.js package in two ways:- Download from nodejs.org, or
- Install through the command line using
apt-get
(or whatever package manager is supported by your OS, i.e.yum
) - Verify the installation succeeded using
node -v
on command line. You should see the version of your package printed out (e.g.v10.14.2
).
- [MacOS, Linux] Install Homebrew (e.g.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
)- After installing, upgrade existing packages by running the command:
brew upgrade && brew update
- After installing, upgrade existing packages by running the command:
- Acquire MongoDB in the main directory as well (locally on your machine).
- MacOS, Linux:
- Use Homebrew to install MongoDB:
brew tap mongodb/brew
brew install mongodb-community
- Use Homebrew to install MongoDB:
- Windows:
- Download and install the package from the MongoDB website
- Follow your OS's installation instructions listed on the MongoDB website
- MacOS, Linux:
- After installing MongoDB, initialize your database document store by creating the
/data/db
directory- MacOS, Linux:
sudo mkdir -p /Volumes/data/db
(Usesudo
in front ofmkdir
if necessary)sudo chown -R `id -un` /Volumes/data/db
(Usesudo
in front ofchown
if necessary)
- Windows:
cd C:\
md "\data\db"
- MacOS, Linux:
- [Windows] Install git by downloading it here
- [Windows] Install PM2
npm i -g pm2
- If you haven't already cloned the project on your local machine, clone the
dev
branch into a location of your choice (e.g. theDocuments
directory):git clone https://github.com/arjohnston/myface
- Go to the root directory of the project (i.e.
cd /path/to/your/.../myface/
- Create your own branch to work off of:
git checkout -b [name]
- [Windows] In a new terminal window, run the mongo daemon by entering:
"C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" --dbpath="c:\data\db"
- Run the app in the root project directory using:
npm start
- MacOS, Linux:
npm start
- Windows:
node util/scripts/start.js
- The app should automatically run on port 3000 and 8080 and open in your default browser
- MacOS, Linux:
In the project directory, you can run:
Build and run:
npm run start
Manually build:
npm run build
Manually start the API server:
npm run start-api
Manually start the API:
npm run start-ui
Launch the test runner utilizing mocha and chai:
npm test
Run a script to get the latest changes from github, installs any new dependencies and spawns the daemons:
npm run deploy
Run a linter against the repository to standardize the format of the code:
npm run lint