replace deprecated code in the express server