4 ms·
You can specify whatever version of Node.js you want to use in the engines section of your package.json: https://cloud.google.com/nodejs/resources/runtime#engi
by justinblat 11y ago
You can specify whatever version of Node.js you want to use in the engines section of your package.json:
https://cloud.google.com/nodejs/resources/runtime#engines https://cloud.google.com/nodejs/resources/runtime#engines
- BinaryIdiot 11y agoFrustrating that it doesn't specify how it gets those versions. Is it always direct from the node folks so it's going to always have all versions or do they have their own cache?
- diggan 11y agoReading the source code of the docker container they use (https://github.com/GoogleCloudPlatform/nodejs-docker/blob/master/base/install_node#L34-L44 https://github.com/GoogleCloudPlatform/nodejs-docker/blob/ma...) it seems like it's reading the available versions from an URL (http://storage.googleapis.com/gae_node_packages/node_versions http://storage.googleapis.com/gae_node_packages/node_version...) which points to some Google hosted storage. So I'm guessing they have some process to update this list after a new release and also caches the versions themselves.
- dlor 11y agoYep, we update the available versions constantly and just serve them from GCS to reduce download time. I'll get this documented somewhere. Disclosure: I work on GCP.
- BinaryIdiot 11y agoFantastic, thanks!