Content Creator, indie product engineer, and digital nomad.
I create content about being a solopreneur and production-ready apps. Twitter, YouTube, and my blog.
Nice article. I'm wondering maybe you have an idea about deploying a monorepo to Now. I have a yarn workspaces monorepo with 2 NextJs apps inside and 1 common package.
So:
Thanks for the kind words! :-) I personally don't have any experience with Next/Now in a monorepo, but I think it should be fairly easy to do this.
In your DNS settings you'll point both publisher.domain.com and domain.com to alias.zeit.co. The recommended way is to use Zeit's nameservers, but I haven't used that yet. I stuck with adding the CNAME records.
In both your web/ and publisher/ subdirectories you'll have a now.json file with an alias that corresponds with the domain. When deploying an app you'll cd into the corresponding directory and run now from there.
You'll end up with 2 projects in Now, both using the same domain. I'm not sure if this works but maybe it'll help you into the right direction :-)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Robbert,
Nice article. I'm wondering maybe you have an idea about deploying a monorepo to Now. I have a yarn workspaces monorepo with 2 NextJs apps inside and 1 common package.
So:
And I'm trying to deploy them like
domain.com/
points to/web
&publisher.domain.com
points to/publisher
apps.(Also I am using dynamic routing for localization like domain.com/en/profile or domain.com/es)
Hi Davíd,
Thanks for the kind words! :-) I personally don't have any experience with Next/Now in a monorepo, but I think it should be fairly easy to do this.
In your DNS settings you'll point both publisher.domain.com and domain.com to alias.zeit.co. The recommended way is to use Zeit's nameservers, but I haven't used that yet. I stuck with adding the CNAME records.
In both your web/ and publisher/ subdirectories you'll have a now.json file with an alias that corresponds with the domain. When deploying an app you'll cd into the corresponding directory and run
now
from there.You'll end up with 2 projects in Now, both using the same domain. I'm not sure if this works but maybe it'll help you into the right direction :-)