add node middleware function
0.4.2