Comments (15)
We should be able to create a now v2 deployment by exporting every route as an independent lambda, like next.js does.
Having build/index.js entry point means a single point of failure
from sapper-template.
I am up to task, with some pointers in the right direction.
from sapper-template.
@stunjiturner yeah - now v1, it's a different beast to what now is becoming, hence the need for support. Once they deprecate v1, the app will no longer work.
from sapper-template.
@bob-bea-fre yes, but this isn't future proof. Now is moving on, and Sapper should follow it.
from sapper-template.
Hi, im building a "sapper+bulma crud"
my now v2 implementation is here: diff demo
from sapper-template.
I think until this is better documented and on v2 we should remove the now part from the documentation. It is dangerous if it uploads and exposes all working files as it could expose server secrets which lie in the sapper app
from sapper-template.
I've been considering this myself. I think we need to fork https://www.npmjs.com/package/@now/next in order to get it to work.
from sapper-template.
@stunjiturner you would be a legend.
It appears to me that the structure of a next app is very similar to a sapper app, so I would just recommend taking a copy of the next builder from https://github.com/zeit/now-builders and adjusting the way that routes are mounted (at the bottom of the launcher.js file I believe).
I am also aware that there might be a function in the 'now' cli to run a local now.sh
emulator to make testing this a bit easier.
Happy to help where I can!
from sapper-template.
from sapper-template.
To be honest, I'm not sure of the exact format.
I'd recommend checking out the template and simply running npm run build
to inspect.
from sapper-template.
I noticed that the realworld app in the svelte root repo, uses now for deployment?
from sapper-template.
Just add a now.json with:
{ "version": 1 }
from sapper-template.
Oh I totally agree @antony, was just documenting a temporary workaround.
from sapper-template.
Just wondering if anyone was working on this at the moment. I'm evaluating options so it would be great to test this out.
from sapper-template.
@WHenderson yeah, @thgh has done it here: sveltejs/sapper#564
I'm currently using it for a project, seems to work well!
from sapper-template.
Related Issues (20)
- Set start_url in manifest.json correctly
- How to publish a production site to run in an external HTTP server like Nginx? HOT 1
- npm run export error: Cannot find module sapper HOT 1
- Cannot use import statement outside a module HOT 9
- Include setupTypeScript script only in Rollup branch
- DRY out default Webpack config
- Svelte-check returns error "Cannot find module" on image import when using TypeScript HOT 2
- "Cannot use namespace 'Preload' as a type" error when typing preload function HOT 7
- Error: Unexpected character '�' (Note that you need plugins to import files that are not JavaScript) HOT 5
- Module '"*.jpg"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
- Sapper Typescipt, can't spin up dev server HOT 4
- Page doesn't load. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘TypeError: NetworkError when attempting to fetch resource
- css sourcemap broken HOT 1
- sapper export to electron, broken paths
- Service worker warns: No directory provided. Skipping CSS generation HOT 11
- Types in latest Sapper incompatible with Express HOT 1
- Bug: Rollup plugin-replace: preventAssignment set to "false" HOT 11
- Getting started tutorial: Live reload not working HOT 3
- Upgrade webpack template to use svelte-loader 3.0.0 HOT 3
- Type errors after converting to TypeScript HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sapper-template.