Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
victorekpo committed Jul 13, 2024
1 parent dbd5536 commit 4d63c99
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 3 deletions.
1 change: 1 addition & 0 deletions .husky/precommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FILE="./client/wrangler.toml"
if [ -f "$FILE" ]; then
cp $FILE ~/tmp.wrangler.toml
sed -i -e 's/account_id = ".*"/account_id = "**********"/' $FILE
sed -i -e 's/pattern = ".*"/pattern = "**********"/' $FILE
echo "$FILE updated"
git add -A
else
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Serverless Microapp

## Client Hosted on Cloudflare Workers
- uses itty-router for Express-like routing
- uses handlebars for views engine
- 100,000 free requests per day

## Server Hosted on AWS Lambda
- uses node engine
- best for database operations (i.e. working with MongoDB)
6 changes: 3 additions & 3 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Once you are ready, you can publish your code by running the following command:
wrangler publish
```

[wrangler config](https://developers.cloudflare.com/workers/wrangler/configuration/)
[handlebars](https://marnixkok.nl/news/blog/handlebars-templates-in-cloudflare-workers)
[serverless rendering](https://blog.cloudflare.com/serverless-rendering-with-cloudflare-workers)
- [wrangler config](https://developers.cloudflare.com/workers/wrangler/configuration/)
- [handlebars](https://marnixkok.nl/news/blog/handlebars-templates-in-cloudflare-workers)
- [serverless rendering](https://blog.cloudflare.com/serverless-rendering-with-cloudflare-workers)
24 changes: 24 additions & 0 deletions client/assets/pages.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/assets/partials.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions client/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ account_id = "**********"
workers_dev = true
compatibility_date = "2024-07-11"

[route]
pattern = "**********"
custom_domain = true

[build]
command="npm run build"
watch_dir="views/"

0 comments on commit 4d63c99

Please sign in to comment.