Code Monkey home page Code Monkey logo

Comments (2)

skyvow avatar skyvow commented on August 15, 2024

@ping-chen

app.use(/^((?!sign\/up|sign\/in|captcha).)+$/, [ jwt({ secret: config.secret}), auth.verifyToken.bind(auth) ])

接口(除 sign/up、sign/in、captcha 之外)是都是非开放性的,基于 JSON Web Tokens 后台身份验证。登录成功后返回一个有效 token,之后每次请求都会放在请求头 headers 里面 Authorization: token,认证成功返回 200, 失败返回 401。

如果不需要认证机制,可以注释掉上段代码。

from m-mall-admin.

ping-chen avatar ping-chen commented on August 15, 2024

非常感谢,可以了。
这里是小程序的token处理?根据appid,secret作为处理的吗?

还有件事,整套程序,要用到 npm -g babel babel-cli webpack express
好像就这几个吧,我都记不清了,今天在新云服务器部署,你的readme没有写的太清楚
调了一个下午。
最要命的是public 缺少.babelrc 导致npm run build 报错中止

以上是centos7服务器上部署

最后,感谢作者的开源。让我可以好好学习!

from m-mall-admin.

Related Issues (20)

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.