Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 1.03 KB

README.md

File metadata and controls

74 lines (55 loc) · 1.03 KB

Code Editor

Live, Interactive online coding workspace inspired by Codedamn playgrounds image

TODO

  • Figure out way to bundle node_modules type defs
  • Current Typescript type defs support is crappy

Installation

Three main parts to setup

  • Frontend
  • Backend API
  • Playground and proxy docker container

Frontend

Create a .env.local file in the root directory

VITE_API_URL=
VITE_IS_SECURE=
VITE_PG_SUBDOMAIN=
bun install
bun run build
bun preview

Backend API

Create a .env file with the following contents

UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
DATABASE_URL=
BUCKET=
REGION=
ACCESS_KEY=
SECRET_KEY=
DOMAIN=
SECURE=
cd backend
bun install

bun run build
node dist/index.mjs
# OR
bun dev

Nginx Proxy Container

cd nginx
chmod +x ./proxy.sh
./proxy.sh

Playground Container

cd container
docker build -t playgrounds:prod . -f Dockerfile.prod