Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Upgrade the deployment settings to now v2 #101

Open
aruzikulov opened this issue Jan 26, 2019 · 5 comments
Open

Upgrade the deployment settings to now v2 #101

aruzikulov opened this issue Jan 26, 2019 · 5 comments

Comments

@aruzikulov
Copy link

Now v2 has more benefits, just changing the now.json file's version into v2 isn't working. It would be great if someone upgrade zeit now settings to now v2

@headwinds
Copy link

@aruzikulov I'm also interested in this upgrade - I know that the sample now.json for both NextJS and Express are a bit more complex than changing the number but not much more.... we would basically have to configure the routes.

@iaincollins mind if I take a stab at it and then open a PR for you to review?

NextJS sample

{
    "version": 2,
    "name": "nextjs",
    "builds": [
        { "src": "next.config.js", "use": "@now/next" }
    ]
}

Express sample

{
  "version": 2,
  "name": "my-express-project",
  "builds": [
    { "src": "www/**/*", "use": "@now/static" },
    { "src": "api/**/*.js", "use": "@now/node" }
  ],
  "routes": [{ "src": "/", "dest": "www/index.html" }]
}

@headwinds
Copy link

headwinds commented Jun 10, 2019

I did a little research and kicked the tires - I'm getting build errors on the routes so it does seem more complicated than I had thought

issues:

nextjs & express thread 1

nextjs & express thread 2

Custom Routes Solution

Zeit Doc

More great discussion...

how-to-deploy-next-js-app-with-custom-express

express & nextjs

...which has a nice example by @hvaoc http://unplggd.co which looks promising

demo

github source <-- I'll try his project

demo <-- I was able to deploy it - it just took awhile... first time it timed out but second time it deployed in about 2 minutes - not sure why it takes so long but its working

@iaincollins
Copy link
Owner

Ugh thanks!

The changes that are now in Next.js 9 and the release of now.sh were why I let this stall for so long.

I hope to update with the new CSS, API route handling in Next.js, and upgrade it to now.sh 2, with additional config that allows it to also be deployed out of the box on Google Cloud Platform, AWS and AWS Edge.

@aruzikulov
Copy link
Author

perfect, can't wait to see your update :)

@RomanShabanov
Copy link

Ugh thanks!

The changes that are now in Next.js 9 and the release of now.sh were why I let this stall for so long.

I hope to update with the new CSS, API route handling in Next.js, and upgrade it to now.sh 2, with additional config that allows it to also be deployed out of the box on Google Cloud Platform, AWS and AWS Edge.

Any news?

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

4 participants