# Using npm

Third-party dependencies can be introduced in cloud functions to make development easier. The cloud function's runtime environment is Node.js, so we can use npm to install third-party dependencies. For example, in addition to using the native http API provided by Node.js to initiate network requests in the cloud function, we can use a mainstream Node.js network request library request to initiate network requests more easily.

Note that, when you upload a cloud function in the IDE, you can choose installation of dependency on the cloud (the node_modules folder is not uploaded) or full upload (the node_modules folder is uploaded with the cloud function).

In the next chapter, we will learn about the official cloud function SDK: wx-server-sdk.

点击咨询小助手