2.2 KiB
Developing Zed's Backend
Zed's backend consists of the following components:
- The Zed.dev web site
- The Zed Collaboration server
- implemented in the
crates/collabdirectory of the mainzedrepository - hosted on DigitalOcean, using Kubernetes
- implemented in the
- The Zed Postgres database
- defined via migrations in the
crates/collab/migrationsdirectory - hosted on DigitalOcean
- defined via migrations in the
Local Development
Here's some things you need to develop backend code locally.
Dependencies
- Postgres - download Postgres.app.
Setup
-
Check out the
zedandzed.devrepositories into a common parent directory -
Set the
GITHUB_TOKENenvironment variable to one of your GitHub personal access tokens (PATs).-
You can create a PAT here.
-
You may want to add something like this to your
~/.zshrc:export GITHUB_TOKEN=<the personal access token>
-
-
In the
zed.devdirectory, runnpm installto install dependencies. -
In the
zed directory, runscript/bootstrapto set up the database -
In the
zed directory, runforeman startto start both servers
Production Debugging
Datadog
Zed uses Datadog to collect metrics and logs from backend services. The Zed organization lives within Datadog's US5 site, so it can be accessed at us5.datadoghq.com. Useful things to look at in Datadog:
- The Logs page shows logs from Zed.dev and the Collab server, and the internals of Zed's Kubernetes cluster.
- The collab metrics dashboard shows metrics about the running collab server