-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
Your machine should have Yarn or Npm installed.
Note: Preferable versions
Version | |
---|---|
node | 16 |
npm | 6 |
yarn | 1.16 |
lerna | 4 |
- Check the node and npm versions by running the following commands.
node -v
npm -v
- Install lerna globally by running the following command.
npm i lerna -g
- Install yarn
npm i yarn -g
You can get your own fork/copy of Frontend by using the Fork
button.
You need to clone (download) it to a local machine using
git clone https://github.com/rudrakshi99/Jan-Dhan-Darshak.git
This makes a local copy of the repository in your machine.
Once you have cloned the Jan-Dhan-Darshak repository in GitHub, move to that folder first using the change directory command.
This will change the directory to a folder
cd Jan-Dhan-Darshak
Move to this folder for all other commands.
Run the following commands to see that your local copy has a reference to your forked remote repository in GitHub
git remote -v
By running the above command, you can see that the local copy has a reference to the forked remote repository in GitHub.
origin https://github.com/Your_Username/Jan-Dhan-Darshak.git (fetch)
origin https://github.com/Your_Username/Jan-Dhan-Darshak.git (push)
- Install the Dependencies from
npm
$ npm i
- Run the Server and see the demo at https://expo.dev/client
$ expo start
- Build for Android
$ expo build:android
- Build for IOS
$ expo build:ios
Fork Jan Dhan Darshak Backend repository and clone at your local
- Fork and Clone the repo using
$ git clone https://github.com/rudrakshi99/Jan-Dhan-Darshak.git
- Change Branch to
backend
using
$ git checkout backend
Creating Virtual Environment
A virtual environment is a tool that helps keep dependencies required and the project isolated. If you wish to install a new library and write
pip install name_of_library
on the terminal without activating an environment, all the packages will be installed globally which is not a good practice if you’re working with different projects on your computer.
If this sounds a bit complicated, don’t worry so much because a virtual environment is just a directory that will contain all the necessary files for our project to run.
Installing venv (required once)
Windows
py -m pip install --user virtualenv
py -m venv env
Linux
python3 -m pip install --user virtualenv
python3 -m venv env
You have to start virtual environment everytime you start new terminal -
Windows
Using gitbash
. env/Scripts/activate
Using Powershell
. env\Scripts\activate
Linux
source env/bin/activate
Windows
pip install -r requirements/base.txt
pip install -r requirements/local.txt
Linux
pip install -r requirements/base.txt
pip install -r requirements/local.txt
Configuring Environment Variables
Make an environment file by copying the example file -
cd .envs/.local
cp .django .env
cp .postgres .env
Windows
py manage.py migrate
Linux
python3 manage.py migrate
Windows
py manage.py createsupeser
Linux
python3 manage.py createsupeser
Windows
py manage.py runserver
Linux
python3 manage.py runserver
deactivate