Sveltegram Sveltekit Web screenshot

Sveltegram Sveltekit Web

Author Avatar Theme by Harshmangalam
Updated: 2 May 2021
7 Stars

This is a simple instagram like image and post sharing web app where user can follow another user view their profile like post and create post

Categories

Overview:

This article provides information on how to build a Svelte project using the create-svelte tool. It includes instructions on project creation, development, and building, with details on adapting the project for different environments.

Features:

  • Project Creation: The article explains the necessary steps to create a Svelte project using the create-svelte tool.
  • Development: It provides instructions on installing dependencies and starting a development server for the Svelte project.
  • Building: The article discusses how Svelte apps are built with adapters to optimize deployment for different environments. It also explains how to use different adapters and provides a list of official adapters available.

Installation:

To create a Svelte project, follow these steps:

  1. Install create-svelte globally using npm: npm install -g create-svelte
  2. Create a new project: create-svelte my-project

To start the development server:

  1. Install project dependencies: npm install
  2. Start the development server: npm run dev

To build the Svelte app:

  1. By default, running npm run build will generate a Node app that can be run using node build.
  2. To use a different adapter, add it to the devDependencies in the package.json file with the specified version as “next”.
  3. Update the svelte.config.cjs file to specify the chosen adapter.
  4. Official adapters available include:
    • @sveltejs/adapter-node
    • @sveltejs/adapter-static
    • @sveltejs/adapter-netlify
    • @sveltejs/adapter-vercel

For more details on adapters, refer to the adapter documentation.

Summary:

This article provides a comprehensive guide on how to build a Svelte project using the create-svelte tool. It covers project creation, development, and building, with specific information on adapting the project for different environments using Svelte adapters. The article is a useful resource for developers looking to work with Svelte and improve their project deployment process.