Skip to content
bbconfhqPublic

About

Simply sharing your code for one week

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

mycodes

Source of mycod.es: paste code, get a shareable link with syntax highlighting and line anchors (#L5, #L5-9). Pastes expire after 7 days.

  • frontend/: SvelteKit app (editor, viewer, /:id/raw plain-text route)
  • server/: Go (Fiber + GORM + SQLite) API under /api/v1/code

Getting Started

  1. Create an empty live.db in server. Docker Compose mounts this file; if it is missing, Docker creates a directory instead and SQLite fails to open it.
# On Windows:
fsutil file createNew server/live.db 0
# On Mac, or Linux:
touch server/live.db
  1. Copy server/.env.sample to server/.env and fill in the values:
cp server/.env.sample server/.env
  1. Launch the server and the frontend:
cd server && go run app.go
cd frontend && pnpm install && API_URL=http://localhost:4000 pnpm dev

API_URL tells the dev server where the API is. Without it, the Docker service names (server, mycodes-server) are used.

  1. Or, use Docker Compose to launch both:
make dev

Tests

cd server && go test ./...
cd frontend && pnpm check && pnpm build

About

Simply sharing your code for one week

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages