To run this project on your local machine, make sure you install the following dependencies:
Then, you will need to download the dev.js
configuration file which contains secret API keys and copy it into the optimine/server/src/config
directory.
mv <path/to/dev.js> server/src/config
Finally, to run the project you will need 2 seperate processes running on your machine, one for each the front and back-end servers. This is easily accomplished by running each server in a seperate terminal session.
Navigate to the optimine/server
directory, execute npm install
, and start a local server.
cd server
npm install
cd ../
node ./server/src/server.js
Navigate to the optimine/client
directory, execute npm install
, and start a local web server.
cd client
npm install
npm start
This project is developed using node.js
and npm
, which must be installed on your machine. The following sections contain guidelines for development using git.
git clone https://github.com/ahadjawaid/optimine.git
For development you will need to add the dev.js config file into server/src/config
containing the API keys
- Add all change to the working directory. Note,
.
references all the files in the current directory and file paths may be used instead.
git add .
- Save changes to the local repository. The message should briefly describe the changes you've made, or the features you've added.
git commit -m "<commit message>"
- Upload local repository content to the remote repository
git push
Download content from a remote repository and immediately update the local repository to match that content. This can only be executed after committing any local changes you've made.
git pull
When working on a particular feature, it's suggested you start a new branch so your code doesn't conflict with other team members during development. After you finish, you can open a Pull Request to merge your branch with the main
branch.
- Create a new branch. The branch name should title the features it introduces.
git checkout -b <branch name>
-
Complete work on your development branch. See How to make changes to the repository?
-
Push all changes to the remote repository, open a pull request on github, and notify team members to review your work and merge your development branch.