This repository provides a simple index.php wrapper around a flowerpot
in a garden. Any path requested from the domain
hosting the flowerpot will be shimmed to a request for the same path append
to the FLOWERPOT_ROOT_URL
and replace the page.
To deploy this code in Vercel, take the following steps.
- Fork this repository.
- Modify the
XXXX
in the linedefine('FLOWERPOT_ROOT_URL', 'XXXX')
inapi/index.php
to point to your garden. - Commit the change.
- Import the forked repository in Vercel and configure your custom domain.
See https://github.com/chckyn/notes-flowerpot for an example of a configured flowerpot running on Vercel.
The vercel.json
in your forked repository specifies that the vercel-php
runtime will run api/index.php
on a serverless function on a Vercel edge
server. All page requests to your custom domain will route to /api/index.php
.