Welcome to the Svelte Snake Workshop!
Install the dependencies …
yarn install
… then start Rollup:
yarn run dev
Important: it's yarn run dev
, not yarn run start
.
Navigate to localhost:5000. You should see your app
running. Edit a component file in src
, save it, and reload the page to see
your changes.
Once this is running, you'll be ready to try out the tasks (Norwegian bokmål).
To create an optimised version of the app:
yarn run build
You can run the newly built app with yarn run start
. This uses
sirv, which is included in your package.json's
dependencies
so that the app will work when you deploy to platforms like
Heroku.
With now
Install now
if you haven't already:
yarn add -g now
Then, from within your project folder:
cd public
now deploy --name my-project
As an alternative, use the Now desktop client and simply drag the unzipped project folder to the taskbar icon.
With surge
Install surge
if you haven't already:
yarn add -g surge
Then, from within your project folder:
yarn run build
surge public my-project.surge.sh