Skip to content

Latest commit

 

History

History
74 lines (53 loc) · 1.9 KB

local.md

File metadata and controls

74 lines (53 loc) · 1.9 KB

Local Development Setup

The instructions on this page will guide you in setting up a local development environment in your system.

For a start, fork Query-Server to your own github account. Then, clone it to your local system.

git clone -b master https://github.com/<your_username>/query-server.git

Add an upstream remote so that you can push your patched branches for starting a PR .

cd query-server
git remote add upstream https://github.com/fossasia/query-server.git

Make sure you have Nodejs installed. Running this tool requires installing the nodejs as well as python dependencies.

npm install -g bower
bower install
pip install virtualenv
virtualenv venv
source activate venv # Linux
venv\Scripts\activate # Windows
pip install -r requirements.txt

To set up MongoDB on your server :

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start

To run the project on a local machine.

python app/server.py

Preferred Development Workflow

  1. Get the latest copy of code from upstream.
git pull upstream master
  1. Once you get assigned an issue, create a new branch from master.
git checkout -b XXX-mock-issue     # XXX is the issue number
  1. Work on your patch, test it and when it's done, push it to your fork.
git push origin XXX-mock-issue
  1. File a PR and wait for the maintainers to suggest reviews or in the best case merge the PR. Then just update master of your local clone.
git pull upstream master

And then loop back again. For contribution guidelines, refer here