Skip to content

Instantly share code, notes, and snippets.

@1oglop1
Created October 24, 2019 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1oglop1/bbbaa7743edd4e2e9c2ed1702b5b1a58 to your computer and use it in GitHub Desktop.
Save 1oglop1/bbbaa7743edd4e2e9c2ed1702b5b1a58 to your computer and use it in GitHub Desktop.
how about Now.sh?
{
"version": 2,
"name": "my-python-project",
"builds": [
{ "src": "www/**/*", "use": "@now/static" },
{ "src": "api/**/*.py", "use": "@now/python" }
],
"routes": [
{
"src": "/",
"dest": "www/index.html"
},
{
"src": "^/api/(function|function\\.py)$",
"dest": "api/function.py"
},
{
"status": 404,
"src": "/api(\\/.*)?$"
}
]
}
public
├── api
│   ├── function.py
│   └── requirements.txt
├── now.json
└── www
└── index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment