本文介绍了在meteor.js 中处理发布数据的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在我的meteor.js 应用程序中处理一些POST 数据,有没有简单的方法来做到这一点?
I need to handle some POST data in my meteor.js app, is there an easy way to do this?
非常基本,如果它是一个 PHP 应用程序,我只想要 $_POST 变量.
Very basic, if it was a PHP app I would just want the $_POST variable.
推荐答案
Meteor router
Meteor router
https://github.com/tmeasday/meteor-router#server-侧路由
Meteor.Router.add('/items/:id', 'POST', function(id) {
// update Item Function
return [200, 'ok'];
});
这篇关于在meteor.js 中处理发布数据的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!