porting backend imageback php to node