Giter VIP home page Giter VIP logo

svelte-spa-router-template-flowbite's Introduction

Svelte 3 Up and Running

Want to learn Svelte 3 and how to build a Single-Page App (SPA) with it (and with this router)? Check out my book Svelte 3 Up and Running on Amazon.

Svelte app with svelte-spa-router

This is a project template for Svelte 4 apps that includes svelte-spa-router for client-side routing, TypeScript, and Vite as bundler.

Flowbite

This project integrates Flowbite UI with the svelte spa router. There are 3 pages in total as example. Front page, login page and app page.

About svelte-spa-router

svelte-spa-router is a client-side router for Svelte 4 apps that leverages hash-based routing (i.e. stores the current view in the URL after the # symbol).

You can read more about the router, and the reasons why you might want to use hash-based routing (or not), in the documentation.

Get started

Install the dependencies…

cd svelte-app
npm install

…then start a dev server:

make run

Navigate to http://localhost:5050. You should see your app running. Edit a component file in src, save it, and reload the page to see your changes.

You can add more routes by defining them in the src/routes.ts file. More information can be found on the documentation for svelte-spa-router.

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

If you're using Visual Studio Code we recommend installing the official extension Svelte for VS Code. If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.

svelte-spa-router-template-flowbite's People

Contributors

0x090909 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.