Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Now Deployment #102

Closed
nonfungibletunji opened this issue Nov 20, 2018 · 15 comments
Closed

Now Deployment #102

nonfungibletunji opened this issue Nov 20, 2018 · 15 comments

Comments

@nonfungibletunji
Copy link

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,

@antony
Copy link
Member

antony commented Nov 20, 2018

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.

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Nov 20, 2018

I am up to task, with some pointers in the right direction.

@antony
Copy link
Member

antony commented Nov 20, 2018

@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!

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Nov 20, 2018 via email

@antony
Copy link
Member

antony commented Nov 20, 2018

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.

@nonfungibletunji
Copy link
Author

I noticed that the realworld app in the svelte root repo, uses now for deployment?

@antony
Copy link
Member

antony commented Nov 23, 2018

@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.

@rob-balfre
Copy link

Just add a now.json with:
{ "version": 1 }

@antony
Copy link
Member

antony commented Dec 22, 2018

@bob-bea-fre yes, but this isn't future proof. Now is moving on, and Sapper should follow it.

@rob-balfre
Copy link

Oh I totally agree @antony, was just documenting a temporary workaround.

@WHenderson
Copy link

Just wondering if anyone was working on this at the moment. I'm evaluating options so it would be great to test this out.

@antony
Copy link
Member

antony commented Apr 13, 2019

@WHenderson yeah, @thgh has done it here: sveltejs/sapper#564

I'm currently using it for a project, seems to work well!

@danielschmitz
Copy link

Hi, im building a "sapper+bulma crud"

my now v2 implementation is here: diff demo

@vladejs
Copy link

vladejs commented Jun 8, 2019

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

@kaleidawave
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants