Net disk speed limit pain we all experienced, this problem in addition to money, in fact, you can use Serverless to solve.

GitHub has an OneManager project that can build Onedrive into a personal web disk. In this article, you will learn how to deploy the application in three steps. Give it a try!

The address of the project: https://github.com/qkqpttgf/OneManager-phpCopy the code

What is OneManager

OneDrive is a powerful OneDrive listing program that uses Microsoft OneDrive API to map the OneDrive directory to a cloud disk.

There are many similar programs, such as OneIndex, Pyone, OnePoint, and many more. The feature of this program is to support a variety of Onedrive types (commercial version, personal version can be) and multi-disk binding, support deployment in Tencent Cloud function SCF.

Add and manage your OneDrive web disk in just three steps:

Deployment tutorial

  1. Enter function service, select “Region” above, and then click “New”
  2. Enter the function name, select the template function, type “onedrive” in the fuzzy search, select “Get onedrive information and display it with API gateway”, click next. Do not move in the code interface, direct point to complete.

  1. Click Trigger Management, create trigger, change the trigger mode to API Gateway trigger, check enable integrated response, submit. You can see an access path in trigger Management, access it, and start installation.

Important: Check the integrated response

It is also possible to deploy using the Serverless Framework:

1. Install the CLI tool Serverless Framework

npm install -g serverless
Copy the code

2. Download the project template code and go to the template directory

sls init scf-for-onedrive
cd scf-for-onedrive
Copy the code

You can also view the details of the project through the SLS Registry SCf-for-onedrive directive.

3. Run the command to complete the deployment

sls deploy
Copy the code

After the deployment is successful, access the created API gateway URL (displayed on the cli).

Serverless ⚡ framework Action: "deploy" -stage: "dev" -app: "scf-for-onedrive" -instance: "ap-guangzhou_default_SCFonedrive" functionName: SCFonedrive description: This application is a list of your onedrive. Namespace: default Runtime: Php7 Handler: index.main_handler memorySize: 128 lastVersion: $LATEST traffic: 1 triggers: apigw: - http://service-793kanym-1xxxxxxx0.gz.apigw.tencentcs.com/release/Copy the code

Finally, according to the program interface guidelines, add your OneDrive disk success!

Is not very simple, compare the above code to run through, you can also complete a Serverless application.

One More Thing

Immediately experience Tencent Cloud Serverless Demo and receive Serverless new user package 👉 Serverless /start

Welcome to: Serverless Chinese!