This is a backend service for running and testing code in a sandboxed environment.
Prerequisites:
- bun -> see
https://bun.com/docs/installation - docker -> see
https://docs.docker.com/engine/install/ - docker image - python:3.10-slim ->
docker pull python:3.10-slim - make sure the user running the code has docker permissions ->
sudo usermod -aG docker $USER, then reload terminal ornewgrp docker - to consume metrics, set METRICS_API_KEY in
.envandprometheus.yml, then you can:
docker run -p 9090:9090 \
-v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheusand open localhost:9090
To install dependencies:
bun installTo run:
bun run dev
or
bun start- Check out the
testsdirectory for examples. - You will find usercode and unittests in
tests/data - You will see the API usage in the
.test.tsfiles.
- Just send a PR!
- Make sure to
bun test!