Home

Awesome

Examples for DanielSharkov/svelte-router

Last updated to v3.1.5 Live Demo

Get started

(I recommend using pnpm, but you may use your desired package manager, or simply npm like in this example)

Install the dependencies by npm i, then start either the first simple exmaple by npm run example-1, the second more advanced example by npm run example-2 or even (the best and most advanced 😄) example by npm run gh-pages, which runs both the simple and advanced exmaples in a simulated browser.

Navigate to localhost:5000. You should see the example running. Feel free to play with the code!

By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv commands in package.json to include the option --host 0.0.0.0.