This repo contains an todo app that is built with Svelte, and Cosmic JS.
git clone https://github.com/sumitkharche/svelte-cosmicjs-app.git
cd svelte-cosmicjs-app
npm install or yarn install
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).
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.
COSMIC_BUCKET=your-bucket-slug COSMIC_READ_KEY=your-bucket-read-key COSMIC_WRITE_KEY=your-bucket-write-key npm run build