The recent pages release
It mentions about ndoe js version.
How is it even linked with node js ??
Isn't pages just the static web hosting?
What is connection between pages and node js ?
5 Replies
Pages is more than just static web hosting with its support of functions, which run on Cloudflare workers, but that's not node.js still
The change log is talking about Pages builds / ci/cd setup where you can have use build environment to build your application from source and then push to Cloudflare. It has a bunch of tooling and default versions, including node.js.
Yeah, i know about the function thing. That is why I was confused as the function is not what they are referring to node js.
So, you are saying that we can deploy a intermediate ci/cd in cloudflare using node js which will run to process the uploaded code and then cleaning or testing and then deploying the final code in production ?
?
It's not really intermediate, it's meant to be an alternative to github actions and such. It pulls down your repo from github or gitlab, runs whatever build command you set, and then your deploy command.
You can set it up to run on each commit, it pulls your repo and for example runs wrangler deploy, which bundles your code and then deploys. It's all nicely integrated
Okay! But, isn't it the default behavior? I have all my projects connected via github only. And i only push to github and cf automatically deploys it.
I never have to setup nodejs or anything extra.
Where is the role of node js and different version requirement?
It's nothing you have to setup, it's just in the build environment along with other tools. Node.js is preinstalled you can use tools like wrangler or a JS Framework to bundle your app.
There's different versions of those tools by default, you can override the versions as well, but without that Cloudflare eventually bumps them to avoid an EOL/out of support tool being used: https://developers.cloudflare.com/workers/ci-cd/builds/build-image/