- Install virtualenvwrapper
$ pip install virtualenvwrapper
First, some initialization steps. Most of this only needs to be done one time.
You will want to add the command to source /usr/local/bin/virtualenvwrapper.sh
to your shell startup file, changing the path to virtualenvwrapper.sh
depending on where it was installed by pip.
- source
$ source /usr/local/bin/virtualenvwrapper.sh
- make ims virtual env
$ mkvirtualenv datable
- clone the repo
$ git clone https://github.com/GeneralInfluence/IMS.git
- go to backend folder
$ cd Datable_Portal/backend
- install requirements.txt
pip install -r requirements.txt
- sync database
$ python manage.py migrate
- start backend server
$ python manage.py runserver
- Access the backend at
http://localhost:8000
- Access the login with the url
http://localhost:8000/accounts/login/
- go to frontend folder
$ cd Datable_Portal/frontend
- install node packages
$ npm install
$ npm install --python=python2.7
- start frontend server
$ npm start
- Access the frontend at
http://localhost:3000
- open nginx default file
$ sudo vi /etc/nginx/sites-available/default
- add our application server config
server {
listen 3000 default_server;
root /.../frontend;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri /index.html;
}
location /datable_backend_app/ {
proxy_pass http://localhost:8000/;
}
location /linkedin/ {
proxy_pass https://www.linkedin.com/;
}
location /twitter/ {
proxy_pass https://api.twitter.com/;
}
location /meetup/ {
proxy_pass https://secure.meetup.com/;
}
location /github/ {
proxy_pass https://github.com/;
}
}
- restart the nginx service
$ sudo service nginx restart
- Access the frontend at
http://127.0.0.1:3000/
Please don't use localhost as some of the social login provider (like twitter, meetup etc.) don't support localhost for redirect_uri.
👍 👍 👍 👍