Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for how to monitor the resulting production app #353

Open
osdiab opened this issue Feb 27, 2021 · 0 comments
Open

Docs for how to monitor the resulting production app #353

osdiab opened this issue Feb 27, 2021 · 0 comments

Comments

@osdiab
Copy link

osdiab commented Feb 27, 2021

I figured out how to tail the logs on my Cloudflare Workers instance using wrangler, but it's not clear from the fab docs how you'd monitor a real production instance of a fab-deployed project. It would be helpful if this kind of info was present somewhere in the docs since monitoring is a big part of running a prod service.

I did this for a Cloudflare Workers deploy:

  • yarn add -D @cloudflare/wrangler
  • touch wrangler.toml
  • Add the following to it:
name = "script-name-you-chose-in-fab.config.json5"
type = "webpack"
workers_dev = false
route = "route-you-chose-in-fab.config.json5"

or can omit route, use workers_dev = true for a workers-dev deploy

  • renamed the example env vars in .env used in the fab config to match those that Cloudflare workers expect: CF_ACCOUNT_ID, CF_ZONE_ID, CF_API_TOKEN
  • yarn add -D dotenv-cli
  • Add a script to package.json: "tail": "dotenv wrangler tail"

Then yarn tail tails the logs as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant