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/rawplain-text route)server/: Go (Fiber + GORM + SQLite) API under/api/v1/code
- Create an empty
live.dbinserver. 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- Copy
server/.env.sampletoserver/.envand fill in the values:
cp server/.env.sample server/.env- Launch the server and the frontend:
cd server && go run app.go
cd frontend && pnpm install && API_URL=http://localhost:4000 pnpm devAPI_URL tells the dev server where the API is. Without it, the Docker service
names (server, mycodes-server) are used.
- Or, use Docker Compose to launch both:
make devcd server && go test ./...
cd frontend && pnpm check && pnpm build