-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92d3aac
commit 59c48c6
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Shabad OS Content API | ||
|
||
This is a PoC, featuring: | ||
|
||
- Azure Functions | ||
- Cloudflare Edge | ||
- Azure Blob Storage | ||
- Azure CDN | ||
- GurbaniNow API | ||
|
||
Wired up, in an assortment of ways. | ||
|
||
```mermaid | ||
graph LR | ||
GN[GurbaniNow] | ||
Function[Azure Function] | ||
CF[Cloudflare Edge] | ||
Blob[Azure Blob Storage] | ||
CDN[Azure CDN] | ||
Function --> GN | ||
CF --> Function | ||
CF --> Blob | ||
CF --> CDN | ||
CF --> GN | ||
CDN --> Blob | ||
Entry -.-> Blob | ||
Entry -.-> Function | ||
Entry -.-> CDN | ||
Entry -.-> CF | ||
``` | ||
|
||
## Setup & Running | ||
|
||
To work with the repo, install dependencies with `npm i`. | ||
|
||
Start the Azure Functions with `npm start`, locally. To spin up any Cloudflare edge workers, `cd` into the desired edge folder (`shabad-edge`) and run `npx wrangler dev -l` for a local instance. | ||
|
||
## Deployment | ||
|
||
The majority of this setup is built with Pulumi as IaaC in TypeScript. After installing pulumi, running `pulumi up` with an appropriately configured Azure account will deploy any stack changes. | ||
|
||
Unfortunately, the Cloudflare Worker provider in Pulumi does not support Cloudflare Worker modules with ES6 imports, therefore, these were manually uploaded with `npx wrangler publish`. An attempt at writing a custom REST provider for this use-case can be seen. |