-
Notifications
You must be signed in to change notification settings - Fork 215
Now Deployment #102
Comments
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. |
I am up to task, with some pointers in the right direction. |
@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 Happy to help where I can! |
When sapper builds a production bundle, is creates a bundle.js file and index.html in the /dist folder?
…On Nov 20, 2018, 11:01 AM -0500, Antony Jones ***@***.***>, wrote:
@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!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
To be honest, I'm not sure of the exact format. I'd recommend checking out the template and simply running |
I noticed that the realworld app in the svelte root repo, uses now for deployment? |
@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. |
Just add a now.json with: |
@bob-bea-fre yes, but this isn't future proof. Now is moving on, and Sapper should follow it. |
Oh I totally agree @antony, was just documenting a temporary workaround. |
Just wondering if anyone was working on this at the moment. I'm evaluating options so it would be great to test this out. |
@WHenderson yeah, @thgh has done it here: sveltejs/sapper#564 I'm currently using it for a project, seems to work well! |
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 |
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 |
When I attempt to deploy to the Now 2.0 nerveless, it does not produce a working app, just shows the file system of the app in web browser,
The text was updated successfully, but these errors were encountered: