Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

Node.js 里如何存 Token?我想把 Token 存在一个所有模块都能拿到的地方

我使用 Node 发起请求登录我的项目,然后我需要带上返回的 Token 再去发起新的请求,将一些数据上传,同时我还需要使用 Worker_threads 再开一个线程向项目后端发起心跳,这个线程要怎么拿到我的 Token 呢,又或者有什么更好的方法能实现心跳,求助大佬。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...