https://github.com/beyonk-group/now-sapper-demo
Now v2 (Serverless) Sapper Application
https://github.com/beyonk-group/now-sapper-demo
demo now now-sh sapper sapperjs serverless svelte sveltejs v2
Last synced: 3 months ago
JSON representation
Now v2 (Serverless) Sapper Application
- Host: GitHub
- URL: https://github.com/beyonk-group/now-sapper-demo
- Owner: beyonk-group
- Created: 2019-09-28T16:06:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T11:37:45.000Z (almost 3 years ago)
- Last Synced: 2025-05-30T13:46:40.472Z (4 months ago)
- Topics: demo, now, now-sh, sapper, sapperjs, serverless, svelte, sveltejs, v2
- Language: JavaScript
- Size: 243 KB
- Stars: 23
- Watchers: 2
- Forks: 7
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless Sapper for Now v2 - demo
by [@antony](https://github.com/antony)
This is a demonstration of a Dynamic (i.e. not Static / Exported) [Sapper Template](https://github.com/sveltejs/sapper-template) to Now v2, using the [Now Sapper](https://github.com/thgh/now-sapper) builder.
Static assets from your application are served from the now CDN.
## Usage
Check out this project from git:
```bash
npx degit beyonk-adventures/now-sapper-demo now-sapper-demo
cd now-sapper-demo
npm i
```and deploy it to now:
```bash
npx now
```## Testing changes
You can deploy using a git repository as the builder. Have a look at `now.test.json`.
```bash
npm run deploy:test
```## Local Usage (Now Dev)
At the current time, Zeit's `now dev` emulator lags significantly behind the real service, and as such, the `now-sapper` module will not work locally. You will encounter the following error:
```bash
> Now CLI 16.2.0 dev (beta) — https://zeit.co/feedback/dev
> Creating initial build
> Error! Unknown file type: undefined
```## Caveats
Though serverless, your Sapper application will still run all routes from a single endpoint `/*`. It does not (yet) support route splitting / differential bundling. I have tried this with a hefty Sapper application, and have not found this to be an issue, though it would be optimal to add this feature.