koa-ts-svelte Svelte Themes

Koa Ts Svelte

A simple template for a KoaJs, Typescript and SvelteJs project

koa-ts-svelte

This is a project template for Koa, Typescript and Svelte apps. It lives at https://github.com/Olyno/koa-ts-svelte.

To create a new project based on this template using degit:

npx degit Olyno/koa-ts-svelte project-name
cd project-name

Note that you will need to have Node.js installed.

Get started

Install the dependencies...

cd project-name
npm install # Or use yarn

...then start Rollup:

npm run dev

The url localhost:3000 will be automatically open in your browser. You should see your app running. Edit a file in src, save it, and see your changes in the browser.

The port of the website can be changed inside the .env file.

Building and running in production mode

To create an optimised version of the app:

npm run build

Builds should support IE11 using buble.

Deploying to the web

With now

Install now if you haven't already:

npm install -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:

npm install -g surge

Then, from within your project folder:

npm run build
surge public my-project.surge.sh

Top categories

Loading Svelte Themes