This project demonstrates how to create a Svelte web app using Project IDX IDE templates and deploy it as a static website using AWS S3.
The account preparation is a standard one as we are only going to need two services: S3 and IAM.
Now you are all set to start using the CLI on project IDX
Access project IDX at idx.google.com
In case you still don't have access, request at idx.dev
Select the "See all templates ->" link or click here to go directly to the templates page.
Choose the Svelte template and wait for Project IDX to build the virtual environment, it should take about 2 minutes.
aws configure
aws s3 mb s3://your-bucket-name
aws s3 website s3://your-bucket-name --index-document index.html
npm run build
aws s3 cp ./dist s3://your-bucket-name --recursive
Your website will be accessible at the following URL:
http://[your-bucket-name].s3-website.[region].amazonaws.com
// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)