// server/methods.js
Meteor.methods({
createReceipt: function(values) {
console.log("Created receipt");
console.log("test");
if (!Meteor.userId()) {
throw new Meteor.Error("not-authorized");
}
var receipt = {
nit: values['nit'],
userId: Meteor.userId()
};
var receiptId = Receipts.insert(receipt);
console.log("Created receipt", receiptId);
}
});
When I execute this, nothing is displayed inside my terminal. I’m using Mac OSX Mavericks with https://github.com/mathiasbynens/dotfiles. Any ideas?
sergiotapia at Sergios-iMac in ~/Work/playground on master [!?]
$ meteor run --settings server/settings.json
[[[[[ ~/Work/playground ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/