pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/wasp-lang/wasp-bot

-b4711dbbb32e.css" /> GitHub - wasp-lang/wasp-bot
Skip to content

wasp-lang/wasp-bot

Repository files navigation

Wasp-bot

Wasp bot is a constantly running nodejs server that serves different purposes:

  • Acting as a Discord bot for our Discord community.
  • Sending Wasp analytics reports.

Development

Prerequisites

Copy .env.example to .env and fill it with your PostHog API key and Discord bot token.

Both are needed to run bot locally, but only PostHog API key is needed to run just analytics locally.

Installation

Run npm install for the first time or after any changes in npm deps.

Also, run npm run prepare to set up pre-commit hooks (for stuff like code formatting and linting!).

Running

When developing, run the bot server locally with npm run buildAndStartBot. This will actually connect it to the Discord server, so you will have two bots running at the same time -> production one, and your development one. So test quickly what you need and then shut it down.

Run npm run buildAndCalcAnalytics to run analytics manually and get the report in the CLI.

Deployment

The bot is deployed to Fly. The fly.toml file contains the configuration for the deployment. The Fly deployoment uses the Dockerfile to build the image.

The bot is deployed automatically on every push to the production branch. You can also deploy with the Fly CLI by running fly deploy.

The Fly.io server on which wasp-bot is deployed has a persistent volume attached to it called wasp_bot_storage mounted at /data dir, in order to persist the cached analytics events from Posthog between deployments. Our Wasp-bot app provides the WASP_ANALYTICS_CACHED_EVENTS_JSON_PATH environment variable, which in this case we set to point to /data/wasp-analytics-cached-events.json.

You can check production app logs with fly logs and SSH into the app container with fly ssh console.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy