Skip to content

oddbit-project/pokie-mullet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pokie-mullet

pypi license

Barebones HTTP proxy for Python-powered SPA applications - Mounts a Flask or Pokie application on a slug (/api by default) and proxies all other requests to a running HTTP server (such as a NodeJS dev server), or to a static SPA on a folder.

Installation

$ pip3 install pokie-mullet

Basic Usage

Show usage parameters:

$ mullet --help

Proxy a local Flask or Pokie API application from main.py and a development SPA application running on http://localhost:3000:

$ mullet

Proxy a local Flask or Pokie API application and a development SPA application locally installed on ../dist:

$ mullet -fe ../dist/

Proxy a local Flask or Pokie API application on "/slug" and a development SPA application running on http://localhost:3000:

$ mullet --slug "/slug"

Static Serving

If a local folder is specified for frontend serving, mullet will always serve contents, even if the required resource doesn't exist. The behaviour is as follows:

  • empty or non-existing routes are served as /index.html (or other index file name you may have specified);
  • existing files are served as files (mimetypes is used to attempt to identify the correct mime type);
  • existing directories are served as /index.html (or other index file name you may have specified);

About

Development HTTP server for python-based SPA applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages