Closed chriscalo closed 5 years ago
Hi,
(Not sure if I'm describing how things work today.)
Yep that's how things work today.
This makes it so that Goldpage doesn't have to build my entire server and can instead only build everything inside of pages/*/.page.js.
This is the case when you run goldpage dev
(instead of goldpage dev ./path/to/server.js
) and goldpage build
(instead of goldpage build ./path/to/server.js
).
goldpage dev
builds only your pages whereas goldpage dev ./path/to/server.js
builds your pages and your server.
This is perfect. I now understand how things work and it feels like a pretty good match for the app I’m working on. Thanks again 🙏
One more idea that builds on #5. Again, feel free to discard if you disagree.
Assume the dev build is already running in watch mode, so a
.build
directory aleady exists and is being updated on each relevant change topages/**/*.page.js
. Or, assume the production build has already been run, so there's a static.build
directory.Could the
ssr.express
handler automatically look for build artifacts inside the.build
directory and serve them when the request URL matches a route from one of the*.page.js
files? It would be important to also call express'snext()
function when the request URL doesn't match any of the*.page.js
routes so that later handlers can run for the same request.(Not sure if I'm describing how things work today.)
This makes it so that Goldpage doesn't have to build my entire server and can instead only build everything inside of
pages/**/*.page.js
.Thoughts?