Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to deploy fodi backend to cloudbase

Shulou Source: shulou.com Published: 2022-05-31 23:18:18 11月23日 Update

This article mainly introduces how to deploy the fodi back-end to cloudbase, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.

Upload and modify backend logic:

Submit backend-py with cloudbase-cli:

{"envId": "default-4gpm7vnrb911600e", "functionRoot": "functions", "functions": [{"name": "fodi", / / fodi is backend-py "timeout": 6, "runtime": "Python3.6", "memorySize": 128, "installDependency": true, "handler": "index.main_handler"}]}

The following guarantee is to use the call path in the form of https://xxxx.service.tcloudbase.com/fodi (defined by the access path in the background):

Def router (event): "" distribute multiple api paths "door = 'https://' + event [' headers'] ['host'] print (' door:'+door) func_path =''# event ['requestContext'] [' path'] / / empty print ('func_path:'+func_path) api = event [' path'] .replace (func_path ''). Strip ('/') api_url = door +'/ fodi' + event ['path'] / / add a fodi string queryString = event [' queryStringParameters'] / / change body = None here.

When it is done, access the access path above, only / fodi, output path error and a long list of things behind means that the server is set up normally.

Get refresh token

Then there is the acquisition of refreshtoken. Http://scfonedrive.github.io has been hung up. We can build a get.html under a certain website first.

Error

Please set the refresh_token in environments

Get a refresh_token

Allow javascript url=_window.location.href; if (url.substr (- 1)! = "/") url+= "/"; url= "https://login.partner.microsoftonline.cn/common/oauth3/v2.0/authorize?scope=https%3A%2F%2Fmicrosoftgraph.chinacloudapi.cn%2FFiles.ReadWrite.All+offline_access&response_type=code&client_id=04c3ca0b-8d07-4773-85ad-98b037d25631&redirect_uri=https://scfonedrive.github.io&state="+encodeURIComponent(url); Document.getElementById ('a1'). Href=url; / / window.open (url, "_ blank")

If it is an international version of url, replace it with: url= "https://login.microsoftonline.com/common/oauth3/v2.0/authorize?scope=https%3A%2F%2Fgraph.microsoft.com%2FFiles.ReadWrite.All+offline_access&response_type=code&client_id=4da3e7f2-bf6d-467c-aaf0-578078f0bf7c&redirect_uri=https://scfonedrive.github.io&state="+encodeURIComponent(url);.

And build an index.html under the root.

OneManager jump page No link here!

If not auto jump, click the link to jump.

If you have not redirected for a long time, please click the link above to continue the installation.

Var Q = new Array (); var query = _ window.location.search.substring (1); / / document.getElementById ('test1') [xss_clean] = query; var vars = query.split ("&"); for (var item0

Tags: Website path article front end result access output representative address that is location error guarantee configuration thing value interest function parameter and at the same time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB Linux vpn Shulou Information