{"id":16873252,"url":"https://github.com/halfdanj/svelte-adapter-appengine","last_synced_at":"2025-03-02T07:10:23.848Z","repository":{"id":37849072,"uuid":"419180468","full_name":"HalfdanJ/svelte-adapter-appengine","owner":"HalfdanJ","description":"Utilize the Google Cloud App Engine infrastructure to host SvelteKit content.","archived":false,"fork":false,"pushed_at":"2024-08-30T18:23:57.000Z","size":2260,"stargazers_count":64,"open_issues_count":15,"forks_count":11,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-14T15:19:12.816Z","etag":null,"topics":["appengine","google","svelte","svelte-adapter","sveltekit"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HalfdanJ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":["halfdanj"]}},"created_at":"2021-10-20T04:07:04.000Z","updated_at":"2024-09-27T18:23:24.000Z","dependencies_parsed_at":"2023-02-18T21:31:26.613Z","dependency_job_id":"addfc593-e30d-44d0-b2f2-4735086a10ad","html_url":"https://github.com/HalfdanJ/svelte-adapter-appengine","commit_stats":{"total_commits":98,"total_committers":7,"mean_commits":14.0,"dds":"0.47959183673469385","last_synced_commit":"8d52a707b42122ea7e3980370a817354d9cea443"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalfdanJ%2Fsvelte-adapter-appengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalfdanJ%2Fsvelte-adapter-appengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalfdanJ%2Fsvelte-adapter-appengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalfdanJ%2Fsvelte-adapter-appengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HalfdanJ","download_url":"https://codeload.github.com/HalfdanJ/svelte-adapter-appengine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241470381,"owners_count":19968041,"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":["appengine","google","svelte","svelte-adapter","sveltekit"],"created_at":"2024-10-13T15:19:28.153Z","updated_at":"2025-03-02T07:10:23.801Z","avatar_url":"https://github.com/HalfdanJ.png","language":"JavaScript","readme":"# svelte-adapter-appengine\n\nEasily deploy your SvelteKit applications on [Google Cloud App Engine](https://cloud.google.com/appengine) with the `svelte-adapter-appengine` package.\n\n[![npm](https://img.shields.io/npm/v/svelte-adapter-appengine?color=green)](https://www.npmjs.com/package/svelte-adapter-appengine)\n[![Tests](https://github.com/halfdanj/svelte-adapter-appengine/actions/workflows/test.yml/badge.svg)](https://github.com/halfdanj/svelte-adapter-appengine/actions/workflows/test.yml)\n[![SvelteKit](https://img.shields.io/badge/Works%20with-SvelteKit-ff3e00.svg)](https://kit.svelte.dev/)\n\n## Getting Started\n\nTo set up the adapter in your SvelteKit project:\n\n1. Install the package as a development dependency:\n\n```bash\nnpm install --save-dev svelte-adapter-appengine\n\n```\n\n2. Update your `svelte.config.js` to use the adapter:\n\n```diff\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\n+import adapter from \"svelte-adapter-appengine\";\n\n/** @type {import('@sveltejs/kit').Config} */\nconst config = {\n  preprocess: vitePreprocess(),\n\n  kit: {\n+   adapter: adapter(),\n  },\n};\n\nexport default config;\n```\n\n3. Build your application:\n\n```bash\nnpm run build\n```\n\n4. Deploy your application to App Engine:\n\n```bash\ngcloud app deploy --project \u003cCLOUD_PROJECT_ID\u003e build/app.yaml\n```\n\nLearn more about the `gcloud` utility in the [official documentation](https://cloud.google.com/sdk/gcloud)\n\n## Configuration Options\n\nCustomize the adapter behavior using the following options:\n\n```ts\nadapter({\n  // Build output directory (default: `/build`)\n  out: \"/build\",\n\n  // Enable Google Cloud Tracing Agent for improved logging (default: `false`)\n  useCloudTracing: false,\n\n  // Enable or disable Google Cloud Logging (default: `false`)\n  // See: https://cloud.google.com/logging/docs/overview\n  useCloudLogging: false,\n\n  // Specify external modules for the esbuild step\n  external: [],\n\n  // Specify Node modules to be added to the `package.json` file in the build step\n  // These modules will be fetched when the application is deployed\n  dependencies: [],\n\n  // Set the Node.js version for the App Engine runtime (default: `18`)\n  // See available runtimes: https://cloud.google.com/appengine/docs/standard/nodejs/runtime\n  nodejsRuntime: 18,\n});\n```\n\nYou can also customize the generated `app.yaml` file by creating an `app.yaml` file in your project root. The adapter will merge your custom configuration with the generated `app.yaml`, allowing you to define custom machine types, routes, or other [app.yaml configurations](https://cloud.google.com/appengine/docs/standard/reference/app-yaml?tab=node.js).\n\n## Adapter Output\n\nThe Server-Side Rendering (SSR) part of SvelteKit is hosted on App Engine using a Node.js runtime, using [polka](https://github.com/lukeed/polka) to mimic [@sveltejs/adapter-node\n](https://github.com/sveltejs/kit/tree/master/packages/adapter-node).\n\nStatic files are served directly from Cloud Storage, bypassing the Node.js web server. The adapter automatically generates routes for all static assets in the `app.yaml` file.\n\n## Example Application\n\nCheck out a live example application at [https://svelte-adapter-demo.uc.r.appspot.com/](https://svelte-adapter-demo.uc.r.appspot.com/). This demo app is the default SvelteKit template deployed with the default adapter settings.\n","funding_links":["https://github.com/sponsors/halfdanj"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfdanj%2Fsvelte-adapter-appengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalfdanj%2Fsvelte-adapter-appengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfdanj%2Fsvelte-adapter-appengine/lists"}