Skip to content

think-biq/corsica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

corsica - Minimalistic CORS and rewrite http dev server

usage: corsica [-h] [--port port] [--host host] [--config config] root

Options

port

Specifies port to host server on.

host

Specifies the hostname (e.g. 127.0.0.1) to host server on.

config

Path to corsica config file.

Config

The origin path is defined as a regular expression.

Simple rewrites.

{
	"rewrites": {
		"/readme": "/readme.md",
		"/license": "/license.md"
	}
}

For more complex rules, you can use named groups. Reference the group name via pythons template variable syntax.

{
	"rewrites": {
		"/(?P<mdfiles>readme|license)": "/${mdfiles}.md",
		"/readme|license)": "/${mdfiles}.md"
	}
}

About

Minimalistic python based http development server supporting CORS and simple path rewrites.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages