It is a small Python Web Application which supports WSGI (Web Server Gateway Interface) to search GitHub Repository using search keyword. The application fetches the result using the GitHub Search API (https://developer.github.com/v3/) and display the latest 5 results and sorts them in decending order based on the Creation Date of the Repository. It displays results such as Creation Date, Author, Description, Last Commit etc in a besutiful presentation. Two version of the application is develop to utilize Gunicorn and uWSGI with NGINX server.
- Python3
- PIP3
- Virtualenv
- uWSGI - 2.0.12
- Gunicorn - 19.4.5
- Jinja - 2.8
- NGINX - 1.9.15
- You should have Python3 installed on your system
- Install PIP3 using
sudo apt-get install python3-pip
- Install Virtualenc using
pip install virtualenv
- Now create a virtual environment using
virtualenv -p [path to your python3] [name of the virtual environment]
- Activate the virtial environment by using
source [path to your virtual environment]/bin/source
[Note:- To deactivate just typedeactivate
] - Install uWSGI using
pip install uwsgi
- Install Gunicorn using
pip install gunicorn
- Install Jinja2 using
pip install Jinja2
- NGINX should be installed in your system
- Download the application from GitHub -
- Extract the application
- Copy the
www
folder within theextras
folder to/home/
- If you like to use uWSGI then copy
localhost.conf
file withinextras
toconf.d
folder of NGINX - If you like to use Gunicorn then change the filename of
localhost.gunicorn.conf
tolocalhost.conf
file withinextras
toconf.d
folder of NGINX - Start NGINX using
sudo service nginx start
- If you like to use uWSGI then move to the folder where you have extracted the application in
terminal
and then runpython application.py
. To stop the server pressCTRL+C
. [Note:- Virtual environment should be activated before this] - Now you can check out the application at
http://localhost:9876
or you can directly use the search feature of the application usinghttp://localhost:9876/navigator?search_term=[search keyword]
replace [search keyword] with your own keyword and you will get the result. - If you like to use Gunicorn then move to the folder where you have extracted the application in
terminal
and then runpython application.gunicorn.py
. To stop the server pressCTRL+C
. [Note:- Virtual environment should be activated before this] - Next process remains the same as above [No. - 17]
- ENJOY 👍 🍺
- Git (For source code management) https://git-scm.com/
- Search GitHub Repository and fetches result using GitHub API and display result in beautiful format
- The Homepage provides a Form to enter your search keyword
http://localhost:9876
- You can also directly access URL with the search keyword and get the result
http://localhost:9876/navigator?search_term=[search keyword]
- The application uses the WSGI concept to serve the application
- NGINX is used as the Web Proxy which receives the request from the client and forwards it to Gunicorn or uWSGI
- Gunicorn and uWSGI serves as the HTTP server and servers the response to NGINX server
- NGINX receives the response and fetches the static files such as css, js etc and serves the page to the client
- Twitter Bootstrap is used to get Responsive Layout so that it fits all screen
If you have any idea you want to implement in this project please do so or if you want to make the code better please go ahead and make a pull request, I will try my best to merge appropriately.
Hope you will like the application. CHEERS 🍺