Svelte + Cosmic JS

This repo contains an todo app that is built with Svelte, and Cosmic JS.

See live demo

Prerequisites

  • Node (I recommend using v8.2.0 or higher)

Getting Started

git clone https://github.com/sumitkharche/svelte-cosmicjs-app.git
cd svelte-cosmicjs-app
npm install or yarn install

Set your config varialbes

In config.js note the keys needed to connect to your Bucket. Go to Your Bucket > Settings after logging into Cosmic JS. Or you add them in the command line on start / build (see below).

Run

COSMIC_BUCKET=your-bucket-slug COSMIC_READ_KEY=your-bucket-read-key COSMIC_WRITE_KEY=your-bucket-write-key npm run dev

Open http://localhost:5000.

Production

COSMIC_BUCKET=your-bucket-slug COSMIC_READ_KEY=your-bucket-read-key COSMIC_WRITE_KEY=your-bucket-write-key npm run build

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes