Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

database-playground/backend-rs

Repository files navigation

@database-playground/backend

The backend of Database Playground. Currently it acts as the resource server and the gateway of dbrunner.

You may need to bring your Logto instance for the authorization server.

Usage

You should prepare your PostgreSQL database. After that, set the POSTGRES_URI environment variable to the URI of your PostgreSQL database.

export POSTGRES_URI=postgresql://username:password@localhost:5432/database

Then, build and run the server:

cargo run --release

You can also build with Nix:

nix build .

Deployment

Deploy it directly to Zeabur with the following command:

npx zeabur deploy

You can also leverage the Nix package manager to build the Docker image for deployment:

# You should prepare a Linux remote builder.
nix build .#packages.aarch64-linux.docker  # For ARM64
nix build .#packages.x86_64-linux.docker   # For x86_64
docker load < result

Development

We use Devenv to manage the development environment, and VS Code as the IDE of Rust.

Install the recommended extensions and run direnv allow && direnv reload to set up the development environment.

Run devenv up to start the PostgreSQL service.

License

This project is licensed under the AGPL-3.0-or-later license.

About

The backend of Database Playground.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published