Svelte Tide Project screenshot

Svelte Tide Project

Author Avatar Theme by Jbertovic
Updated: 10 Apr 2022
18 Stars

Starting project template for Rust Tide server and Svelte

Overview

The Svelte-Tide-ProjectStarter is a template for creating Svelte frontend applications with a Rust Tide backend server. It includes an example of using sessions to store user login information and access secure areas. The template is based on the combination of rocket.rs and Svelte, with inspiration taken from the project at https://github.com/sachinbhutani/svelte-on-rust.

Features

  • Svelte frontend framework for building reactive user interfaces
  • Rust Tide backend server for handling HTTP requests and responses
  • Example of session management for user login and secure access

Installation

To get started with the Svelte-Tide-ProjectStarter, you will need to have Node.js and Rust installed on your machine. Follow the steps below to install and set up the template:

  1. Install Node.js by visiting the official Node.js website and downloading the installer appropriate for your operating system.
  2. Install Rust by visiting the official Rust website and following the instructions for your operating system.
  3. Create a new project based on the Svelte-Tide-ProjectStarter template using the degit command. Open your terminal or command prompt and execute the following command:
npx degit <github-username>/svelte-tide-project-starter my-project
  1. Navigate to the project directory and install the dependencies by running the following command:
cd my-project
npm install
  1. Start the Tide server and Rollup in two separate terminals. In the first terminal, run the following command to start the Rust server:
cargo run
  1. In the second terminal, run the following command to build and enable hot reloading for the Svelte components:
npm run dev
  1. Finally, open your web browser and navigate to http://localhost:8080. You should see your Svelte app running.

Summary

The Svelte-Tide-ProjectStarter template provides a convenient starting point for building Svelte frontend applications with a Rust Tide backend server. It includes features such as session management for user login and secure access. By following the installation guide, developers can quickly set up the template and start building their own projects.