Giter Club home page Giter Club logo

flask-pwa's Introduction

Flask PWA

A progressive webapp template.

Flask PWA is supposed to be a goto template when I start a new Flask project. It is constructed on a Model-Template-Controller perspective, which I find clear enough for my current projects.

You can check a live version at Heroku.

Requirements

Features

  • Blueprint oriented, Flask 1.0 project
  • Instantly deployable on Heroku
  • Off-the-shelf progressive web app behaviour
  • Service worker based on Workbox

Installation

> git clone https://github.com/umluizlima/flask-pwa
> cd flask-pwa
> make environment
> make install

Usage

Due to the current Service Worker specification, the web browser will only allow its registration if the application is served over https, or on localhost for development purposes.

This makes nGrok useful for testing the PWA functionality, as it allows you to expose localhost over the internet with https included.

localhost

> make run

nGrok

> make flask run
> ngrok http 80

Deployment

Heroku

The app.json, Procfile, and runtime.txt files on this repository are specific for deployment on Heroku. It can be done by clicking the following button:

Deploy

Links

Licensing

This project is licensed under MIT license.

flask-pwa's People

Contributors

umluizlima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-pwa's Issues

Unable to install on heroku

Error log { -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2

-----> Installing dependencies with Pipenv 2020.11.15

   Installing dependencies from Pipfile.lock (72b22b)...

   An error occurred while installing markupsafe==1.0 --hash=sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665! Will try again.

   Installing initially failed dependencies...

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/cli/command.py", line 253, in install

   [InstallError]:       site_packages=state.site_packages

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/core.py", line 2063, in do_install

   [InstallError]:       keep_outdated=keep_outdated

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/core.py", line 1312, in do_init

   [InstallError]:       pypi_mirror=pypi_mirror,

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/core.py", line 900, in do_install_dependencies

   [InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/core.py", line 796, in batch_install

   [InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)

   [InstallError]:   File "/app/.heroku/python/lib/python3.6/site-packages/pipenv/core.py", line 703, in _cleanup_procs

   [InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)

   [pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.python.org/simple

   [pipenv.exceptions.InstallError]: Collecting markupsafe==1.0

   [pipenv.exceptions.InstallError]:   Using cached MarkupSafe-1.0.tar.gz (14 kB)

   [pipenv.exceptions.InstallError]:     ERROR: Command errored out with exit status 1:

   [pipenv.exceptions.InstallError]:      command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dakrb5mg/markupsafe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dakrb5mg/markupsafe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vwakgvlc

   [pipenv.exceptions.InstallError]:          cwd: /tmp/pip-install-dakrb5mg/markupsafe/

   [pipenv.exceptions.InstallError]:     Complete output (5 lines):

   [pipenv.exceptions.InstallError]:     Traceback (most recent call last):

   [pipenv.exceptions.InstallError]:       File "<string>", line 1, in <module>

   [pipenv.exceptions.InstallError]:       File "/tmp/pip-install-dakrb5mg/markupsafe/setup.py", line 6, in <module>

   [pipenv.exceptions.InstallError]:         from setuptools import setup, Extension, Feature

   [pipenv.exceptions.InstallError]:     ImportError: cannot import name 'Feature'

   [pipenv.exceptions.InstallError]:     ----------------------------------------

   [pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

   ERROR: Couldn't install package: markupsafe

    Package installation failed...

! Push rejected, failed to compile Python app.

! Push failed }

what are the buildpack required to install it .

Problem with port

Hello, I was trying out the program and now i find myself with the local port 5000 sending me to a local version of the site even with flask shutdown. why is it so? I don't understand. I ended up cleaning wsl on my computer but it's still there

intialization

i am not able to run it in localhost.
Any starting point???

Deploy on remote server

When i run the app from localhost everything works fin, but when i upload it to remote server no the javascript didn't work son no service worker or pwa.
why?

CLI No exception error

Greetings,
When I tried to access the site by using flask run it throws an error saying:
flask.cli.NoAppException: Failed to find Flask application or factory in module "analyticaldashboard.app". Use "FLASK_APP=analyticaldashboard.app:name to specify one.

analyticaldashboard is the name of my folder where all the files resides

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.