Coder Social home page Coder Social logo

dingtalk-micro-app's Introduction

钉钉微应用

目录和文件介绍

  • db/ 持久存储目录,因为开发阶段不想使用数据库,就暂时用文件做持久化存储,便于数据迁移
  • libs/ 功能库目录
    • sdk.js 封装的isv sdk,用来调用isv api、处理服务端推送的消息、签名jsapi_ticket
  • public/ 静态文件目录,如css js文件
  • routes/ 路由目录,主功能代码也在这个目录,后面会提出来
    • admin.js 预留的后台管理路由
    • index.js 微应用路由
    • service.js isv功能调用、授权码生命周期管理等服务
    • storage.js 数据存取
  • views/ 模板目录
  • ./config.default.js 配置文件模板,需要改为config.js才可使用
  • ./app.js nodejs配置目录

使用方法

使用前请先注册钉钉ISV开发者 http://g.alicdn.com/dingding/opendoc/docs/_isvguide/tab2.html?t=1467087383585

  1. config.defaults.js 改为config.js并配置 token、encodingAESKey
  2. 在根目录下执行 npm start 启动服务
  3. 创建套件并确保token加密秘钥config.js中配置一致;IP白名单即服务器IP;回调URL为 http://服务器IP:8808/app/isvreceive
  4. 点击验证
  5. 验证通过后可以拿到suiteKeysuiteSecret,更新config.js中的这两个配置,重启服务
  6. 创建微应用,微应用地址 http://服务器IP:8808/app

dingtalk-micro-app's People

Contributors

dependabot[bot] avatar

Watchers

 avatar  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.