[{"data":1,"prerenderedAt":5},["ShallowReactive",2],{"readme:BygNet\u002FApi":3},{"html":4},"\u003Ch1>Byg API\u003C\u002Fh1>\n\u003Cp>This repo contains the API for Byg - the beautiful, unhinged, open social media.\nThe main Byg-hosted API is accessible \u003Ca href=\"https:\u002F\u002Fapi.byg.a35.dev\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">here\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Terms of Service: \u003Ca href=\"https:\u002F\u002Fbyg.a35.dev\u002Fterms\" target=\"_blank\" rel=\"noopener noreferrer\">Here\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2>Why Byg?\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>We love ash.\u003C\u002Fli>\n\u003Cli>BYGger = BETter (not a reference to an upcoming online gambling service).\u003C\u002Fli>\n\u003Cli>I said so.\u003C\u002Fli>\n\u003Cli>Byg is open source under the Apache License 2.0.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Byg Mobile\u003C\u002Fh2>\n\u003Cp>Byg Mobile for iOS is releasing soon as an open source repo.\nStay tuned!\u003C\u002Fp>\n\u003Ch2>Local database (Postgres only)\u003C\u002Fh2>\n\u003Cp>Run a local Postgres instance:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-shell\">docker run --name byg-postgres \\\n  -e POSTGRES_USER=byg \\\n  -e POSTGRES_PASSWORD=byg \\\n  -e POSTGRES_DB=byg \\\n  -p 5432:5432 \\\n  -d postgres:16\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Set \u003Ccode>.env\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-env\">DATABASE_URL=\"postgres:\u002F\u002Fbyg:byg@localhost:5432\u002Fbyg\"\nDATABASE_SSL=\"disable\"\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Apply schema:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-shell\">bun run db:push\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>PostHog logs\u003C\u002Fh2>\n\u003Cp>Structured API logs are emitted locally as JSON and sent to PostHog through\nOpenTelemetry when a project token is configured:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-env\">POSTHOG_PROJECT_TOKEN=\"phc_...\"\nPOSTHOG_LOGS_URL=\"https:\u002F\u002Fus.i.posthog.com\u002Fi\u002Fv1\u002Flogs\"\nOTEL_SERVICE_NAME=\"byg-api\"\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Use the \u003Ccode>phc_\u003C\u002Fcode> project token from PostHog project settings. Do not use a\npersonal \u003Ccode>phx_\u003C\u002Fcode> API key.\u003C\u002Fp>\n\u003Ch2>Migrating existing SQLite data to Postgres\u003C\u002Fh2>\n\u003Cp>If you have legacy local data in \u003Ccode>data.db\u003C\u002Fcode>, keep that file and run:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-shell\">SQLITE_PATH=.\u002Fdata.db bun run db:migrate:sqlite\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This copies users, sessions, posts, images, comments, follows, messages, and short links into your Postgres DB and syncs serial sequences.\u003C\u002Fp>\n\u003Ch2>Thanks\u003C\u002Fh2>\n\u003Cp>Byg thanks to the following people and projects:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>TypeScript Language\u003C\u002Fli>\n\u003Cli>Bun Runtime (Buntime)\u003C\u002Fli>\n\u003Cli>Elysia js\u003C\u002Fli>\n\u003Cli>Render.com\u003C\u002Fli>\n\u003Cli>Dimabooboobear\u003C\u002Fli>\n\u003Cli>Allie\u003C\u002Fli>\n\u003C\u002Ful>\n",1787323193626]