This is the server for Complete, the VSCode extension that introduces other people's ideas into your code. Written by Curtis Chong, Akshay Saxena, Mayank Kanoria,and Vikram Subramanian. Read what it can do here: github.com/curtischong/complete.
Since the server needs to scrape data from a webpage, you need to run Selenium.
You will need to install a Chrome driver for your computer (found here).
Then go to scrape.py and replace the path in the line:
executable_path='/Users/curtis/Downloads/chromedriver'
With the path of the Chrome driver on your machine.
First you'll have to tell Flask where the main.py
file is.
So run pwd
to get the current directory of the server.
For me, this is /Users/curtis/Desktop/dev/Complete-Server
.
Then I will open up my .bash_profile
file (for mac) via vim ~/.bash_profile
. If you are on linux, run vim ~/.bashrc
.
Then export the FLASK_APP variable inside the file somewhere:
export FLASK_APP=/Users/curtis/Desktop/dev/Complete-Server/main.py
(Don't forget to change my path /Users/curtis/Desktop/dev/Complete-Server
with the location of yours!)
Now when you leave vim, run source ~/.bash_profile
(Mac) or source ~/.bashrc
(Linux).
This will load the path of the server into your terminal session.
Now type flask run
to turn on the server!
Apologies for forgetting to make a virtual environment and simplifying the requirements installation. This will be fixed in the future.