且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

节点js + mysql推送通知

更新时间:2023-02-16 22:20:20

您可以将node.js与mysql库一起使用,以轮询数据库中的新通知,我认为这是您要尝试的操作.我从未亲自完成过特定任务,但我知道这是可以实现的.

You can use node.js with a mysql library to poll your database for new notifications, which I think is what you're trying to do. I've never done that specific task personally, but I know it's achievable.

关于需要编写哪种代码,请尝试查找节点中间件教程",其中可能会有一些变体,包括在搜索查询中包含MySQL,并且至少会找到您要寻找的内容的想法.

In terms of what kind of code you need to write, try looking up "Node Middleware Tutorials" with perhaps some variations that include MySQL in the search query and you'll find at least an idea of what you should be looking for.

如果可以的话,我将使用更具体的代码示例更新此答案,以使您朝正确的方向前进.

If I can I will update this answer with more specific code samples to get you moving in the right direction.