Example Eventvisor project using Cloudflare Pages.
For more information, visit https://eventvisor.org.
The generated datafiles from this repository is accessible via these URLs:
Install the SDK in your application:
$ npm install --save @eventvisor/sdk
Then use it in your application:
import { createInstance } from "@eventvisor/sdk";
const DATAFILE_URL =
"https://eventvisor-example-cloudflare.pages.dev/eventvisor-tag-web.json";
const datafileContent = await fetch(DATAFILE_URL).then((res) => res.json());
const eventvisor = createInstance({
datafile: datafileContent,
});Learn more about SDK usage here.
Since this example app lives outside of the Eventvisor monorepo, you are recommended to make sure package.json has the latest version of @eventvisor/cli package.
$ npm ci
$ npx eventvisor lint
$ npx eventvisor build
Checkout output in datafiles directory.
$ npx eventvisor test
For this example, we are going to be uploading to and serving our datafiles from Cloudflare Pages.
Make sure you already have a Cloudflare Pages project set up, and then use it in the publish workflow.
This example project is configured to run its CI/CD pipeline with GitHub Actions.
You are free to choose any other CI/CD provider of your choice.
Make sure you have Read and write permissions enabled in your GitHub repository's Settings > Actions > General > Workflow permissions section.
You can find the GHA workflow files in .github/workflows directory.
checksworkflow: runs against non-master(non-main) branchespublishworkflow: runs againstmaster(main) branch
Follow the guide here, and set up these two secrets in your GitHub repository's Settings > Secrects and variables > Actions section:
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKEN