I am working with facebook app canvas which requires post.
I am using express to handle app.post('/') and app.get('/'). Is it possible to combine these in a single function?
Aside of binding same function to POST and GET as suggested by JustSid in other answer you may use app.all('/', handler) to route all request types to function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With