{"id":16222904,"url":"https://github.com/michael/svelte-postgres-demo","last_synced_at":"2025-10-27T07:02:41.941Z","repository":{"id":66446970,"uuid":"490718351","full_name":"michael/svelte-postgres-demo","owner":"michael","description":"Sveltekit and Postgres","archived":false,"fork":false,"pushed_at":"2022-05-10T17:21:54.000Z","size":510,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T18:34:24.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michael.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-10T13:52:22.000Z","updated_at":"2025-02-20T19:28:26.000Z","dependencies_parsed_at":"2023-06-28T18:31:27.630Z","dependency_job_id":null,"html_url":"https://github.com/michael/svelte-postgres-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael%2Fsvelte-postgres-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael%2Fsvelte-postgres-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael%2Fsvelte-postgres-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael%2Fsvelte-postgres-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael","download_url":"https://codeload.github.com/michael/svelte-postgres-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989109,"owners_count":20379648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T12:15:45.610Z","updated_at":"2025-10-27T07:02:41.849Z","avatar_url":"https://github.com/michael.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-postgres-demo\n\nA starting point for connecting SvelteKit with Postgres. Write pure SQL and save yourself the headaches with object relational mappers.\n\nIn [api.js](./src/lib/api.js) you can access the database like this:\n\n```js\nexport async function createTodo (userId, { text, done }) {\n  return db.one('INSERT INTO todos(user_id, text, done) VALUES($1, $2, $3) RETURNING *', [userId, text, done]);\n}\n```\n\n## Development\n\nMake sure you have a Postgres DB instance running and provide your connection string as an environment variable.\n\n```zsh\nVITE_DB_URL=postgresql://postgres@localhost:5432/svelte-postgres-demo\npsql -Atx $VITE_DB_URL -f schema.sql\n```\n\nNow run the development server:\n\n```zsh\nnpm run dev\n```\n\n## Questions?\n\nPing @_mql on Twitter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael%2Fsvelte-postgres-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael%2Fsvelte-postgres-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael%2Fsvelte-postgres-demo/lists"}