Skip to content

Commit

Permalink
Update for deploy to Render
Browse files Browse the repository at this point in the history
- Add the SvelteKit Node adapter so web app can run either fully
  client-side or from Node server process.
- Add render.yaml so deploy can use Infrastructure-as-Code
  • Loading branch information
crcastle committed Aug 11, 2021
1 parent de9febc commit 3ea5080
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
@@ -1,12 +1,13 @@
{
"name": "~TODO~",
"name": "sveltekit",
"version": "0.0.1",
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
"preview": "svelte-kit preview"
},
"devDependencies": {
"@sveltejs/adapter-node": "^1.0.0-next.39",
"@sveltejs/kit": "next",
"svelte": "^3.34.0"
},
Expand Down
6 changes: 6 additions & 0 deletions render.yaml
@@ -0,0 +1,6 @@
services:
- type: web
name: sveltekit
env: node
buildCommand: npm install && npm run build
startCommand: node build/index.js
6 changes: 5 additions & 1 deletion svelte.config.js
@@ -1,8 +1,12 @@
/** @type {import('@sveltejs/kit').Config} */

import node from '@sveltejs/adapter-node';

const config = {
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte'
target: '#svelte',
adapter: node()
}
};

Expand Down

0 comments on commit 3ea5080

Please sign in to comment.