Git Product home page Git Product logo

onedrive-list's Introduction

Demo

Deployment

本地运行
npm i
npm start
点击按钮部署到 Vercel↓↓↓

设置 Vercel 环境变量

Deploy with Vercel

0. 本项目需要的环境变量

  • Vercel 部署需在 Vercel 中配置环境变量
  • 本地部署需自行创建并填入到 .env 文件
client_id =                                                           # 必填
client_secret =                                                       # 必填
redirect_uri = http://localhost:3000                                  # 选填
auth_endpoint = https://login.microsoftonline.com/common/oauth2/v2.0  # 选填
drive_api = https://graph.microsoft.com/v1.0/me/drive                 # 选填

gist_id =                                                             # 必填
gist_token =                                                          # 必填
gist_filename = onedrive-token.json                                   # 选填

base_dir = /                                                          # 选填
top = 500                                                             # 选填

1. 使用 ms-graph-cli 获取

client_id client_secret redirect_uri auth_endpoint drive_api refresh_token

# 需安装 Node.js
npx @beetcb/ms-graph-cli -l cn

2. 获取 gist_id

创建 Gist 文件名 onedrive-token.json,文件内容如下:

ms-graph-cli 中获取的 refresh_token 填写进去

{
  "refresh_token": "xxx"
}

Gist 创建完成即可从链接 https://gist.github.com/{username}/{gist_id} 中获取 gist_id

3. 获取 gist_token

https://github.com/settings/tokens

Thanks

onedrive-list's People

Contributors

0wq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.