Receiving post request with a little help from community

Hello guys, today I’ll write about receiving POST requests with Meteor, not because it’s not possible or because there aren’t other ways to do that but, because of some packages that I’ve found doing that.


So, last week I had to write an entry point on my app to receive post callbacks and obviously it could not interfere and could not be treated by FlowRouter so, after some research I found many solutions but the simple one was using Picker, a meteorhacks package.


Ok, I write an entry point and started to receive my post request but, Meteor requests are actually Node.js incoming messages and guess what? I was not able to catch the sent parameters easily, I realized I needed some help and I found node-formidable, amazing package, It provides a simple way to get those parameters. That’s ok, I’m fine now right? Wrong!


With Meteor you can use npm modules just inside packages, you can’t just use it directly on your Meteor apps but, guess what, there’s a way and again arunoda comes to save the day! He wrote a package to make it possible it’s just add meteorhacks:npm to use npm packages directly.

So, in the end of day, with a little help of those incredible packages, I had my small entry point working nicely.



[code language=”javascript”]

var formidable = Meteor.npmRequire(‘formidable’);

Picker.route(‘/status/transacoes/:posbackId’, function(params, req, res, next) {

var posbackId = params.posbackId;

if (req.method == ‘POST’) {

var form = new formidable.IncomingForm();

form.parse(req, Meteor.bindEnvironment(function (err, fields) {

var status = fields[‘current_status’];




var status = {




res.writeHead(200, {‘Content-Type’: ‘application/javascript’});





That’s the importance of community, that’s why I try to contribute even with this simple blog, so, thank you again meteorhacks, thank you again arunoda!


Allan de Queiroz

Allan de Queiroz
London based software engineer

XServer forward from Linux text mode for Headless purposes.

Hello, this post is about XServer forward from Linux text mode, **not ssh forward, anything related to VNC** or things like that.Recently...… Continue reading