Helper functions for node and express.