Google Cloud Functions, Node JS 8.9.x (LTS) and KOA library

前端 未结 4 1339
Happy的楠姐
Happy的楠姐 2021-01-13 02:18

How can I use Koa library, the express replacement, in Cloud Functions?

I know KOA use all great ES2017 and make more use of Async use of JavaScript.

or it

4条回答
  •  终归单人心
    2021-01-13 03:11

    Reading from cloud functions doc:

    Base Image Cloud Functions uses a Debian-based execution environment and includes contents of the gcr.io/google-appengine/nodejs Docker image, with the Node.js runtime installed in the version, specified above:

    FROM gcr.io/google-appengine/nodejs
    RUN install_node v6.14.0
    

    To see what is included in the image, you can check its GitHub project, or pull and inspect the image itself. Updates to the language runtime (Node.js) are generally done automatically (unless otherwise notified), and include any changes in the definition of the base image.

    And I saw a pull request back in November 2017, adding Nodejs v8. Here's hoping it can finally land in Google Cloud Functions

提交回复
热议问题