Hello {name}!
\n{message}
\nChange me!
\nVisit the Svelte tutorial to learn how to build Svelte apps.
\nVisit the Svelte tutorial to learn how to build Svelte apps.
\nVisit the Svelte tutorial to learn how to build Svelte apps.
\nVisit the Svelte tutorial to learn how to build Svelte apps.
\n
+
+[](https://begin.com)
+
+[Svelte](https://svelte.dev)'s starter app, extended by [Begin](https://begin.com)-based API endpoints.
+
+## Deploy your own
+
+[](https://begin.com/apps/create?template=https://github.com/begin-examples/node-svelte)
+
+Deploy your own clone of this app to Begin!
+
+## Getting started
+
+### Project setup
+
+```
+npm install
+```
+
+### Start the local dev server
+
+```
+npm run dev
+```
+
+Navigate to [localhost:3333](http://localhost:3333). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
+
+## Begin Reference
+
+- [Quickstart](https://docs.begin.com/en/guides/quickstart/) - basics on working locally, project structure, deploying, and accessing your Begin app
+- [Creating new routes](https://docs.begin.com/en/functions/creating-new-functions) - basics on expanding the capabilities of your app
+
+Head to [docs.begin.com](https://docs.begin.com/) to learn more!
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 0000000..a89baaf
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,50 @@
+import svelte from 'rollup-plugin-svelte';
+import resolve from 'rollup-plugin-node-resolve';
+import commonjs from 'rollup-plugin-commonjs';
+import livereload from 'rollup-plugin-livereload';
+import { terser } from 'rollup-plugin-terser';
+
+const production = !process.env.ROLLUP_WATCH;
+
+export default {
+ input: 'src/main.mjs',
+ output: {
+ sourcemap: true,
+ format: 'iife',
+ name: 'app',
+ file: 'public/bundle.js'
+ },
+ plugins: [
+ svelte({
+ // enable run-time checks when not in production
+ dev: !production,
+ // we'll extract any component CSS out into
+ // a separate file — better for performance
+ css: css => {
+ css.write('public/bundle.css');
+ }
+ }),
+
+ // If you have external dependencies installed from
+ // npm, you'll most likely need these plugins. In
+ // some cases you'll need additional configuration —
+ // consult the documentation for details:
+ // https://github.com/rollup/rollup-plugin-commonjs
+ resolve({
+ browser: true,
+ dedupe: importee => importee === 'svelte' || importee.startsWith('svelte/')
+ }),
+ commonjs(),
+
+ // Watch the `public` directory and refresh the
+ // browser on changes when not in production
+ !production && livereload('public'),
+
+ // If we're building for production (npm run build
+ // instead of npm run dev), minify
+ production && terser()
+ ],
+ watch: {
+ clearScreen: false
+ }
+};
diff --git a/src/App.svelte b/src/App.svelte
new file mode 100644
index 0000000..6ca0413
--- /dev/null
+++ b/src/App.svelte
@@ -0,0 +1,39 @@
+
+
+Visit the Svelte tutorial to learn how to build Svelte apps.
+