The first step to starting a SvelteKit projects is initialize the app with commands from SvelteKit's website.
npm create svelte@latest my-app
cd my-app
npm install
npm run dev -- --open
We'll then test our app is running by adding html to our src/routes/index.svelte
route.
Ben Patton: [0:00] To get started, go to SvelteKit's website, kit.svelte.div. Scroll down to see the list of commands, and we're just going to run those commands. Run npm create Svelte. Yes, let's go with the skeleton project. [0:27] We're going to say no to the next few questions. I'm going to see the into my SvelteKit blog. We're going to run npm install.
[0:38] All right. Now, open your app. Our app is open with SvelteKit. Now, we see that [inaudible] is running on localhost:4000, so this is actually already running our app. If we go to localhost:4,000, it's already up and running. To test this, go to src/routes/index.svelte. Just add a simple <p> tag. You can make it say whatever you want. We're going to say, "Egghead Demo." Save it and there it is.
[1:16] In review, we went to SvelteKit's website and got started by running these commands, opening our app, and going to our index route and adding this <p> tag to test it, and there it is.