express js middleware as promise