Skip to content

Commit

Permalink
docs: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Jul 10, 2022
1 parent 92d3aac commit 59c48c6
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
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.

0 comments on commit 59c48c6

Please sign in to comment.