Below code is working
var crypto = require(\'crypto\'); var cipher = crypto.createCipher(\'aes-128-cbc\',\'abcdefghijklmnop\') var http = require(\'http\')
Turns out
var cipher = crypto.createCipher('aes-128-cbc','abcdefghijklmnop')
should not be reused. I put it into the server callback too and the problem is solved.