Server side code for WeChat / Node.js / Firebase demo