$ npm create svelte@latest hello
$ cd hello
$ npm install
$ npm install -D @sveltejs/adapter-vercel
$ npm run dev
Change package.json
to:
{
"name": "@jdeighan/hello",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^1.0.0-next.90",
"@sveltejs/adapter-vercel": "^2.4.1",
"@sveltejs/kit": "^1.0.0-next.587",
"svelte": "^3.54.0",
"vite": "^4.0.0"
}
}
Change src/routes/+page.svelte
to:
<h1>Hello There</h1>
In svelte.config.js
, change:
import adapter from '@sveltejs/adapter-auto';
to:
import adapter from '@sveltejs/adapter-vercel';
Install Heroku CLI and execute:
$ heroku login
$ heroku create jd-hello
$ git init
$ git branch -M main
$ git add -A
$ git commit -m "initial commit"