Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flask app on Github pages

Recently I have been trying to create a personal website using a Flask app with Github pages. Once creating a repository titled .github.io and placing an a file titled index.html it will appear live at the address .github.io. However, once this file is deleted and replaced with a basic Flask application then a 404 page appears.

Could I please get some help on what is required to get a Flask app running on Github pages.

Thanks in advance :)

like image 237
Josh Leeb-du Toit Avatar asked May 22 '14 12:05

Josh Leeb-du Toit


People also ask

Can you use Flask with GitHub?

GitHub-Flask is an extension to Flask that allows you authenticate your users via GitHub using OAuth protocol and call GitHub API methods.

Does GitHub Pages support Python?

GitHub Pages does not support server-side languages such as PHP, Ruby, or Python.

Can you host a Web app on GitHub Pages?

Did you know that Github will allow anyone to host their static webpages for free? The best part is that you can even use your own custom domain.


1 Answers

You can't host a python application on Github pages, it's designed for simple static file hosting. You could use something like Flask-Frozen to turn your Flask application into static pages, but then you obviously have some big tradeoffs depending on your site's functionality.

like image 182
Doobeh Avatar answered Sep 16 '22 22:09

Doobeh