Integrating Logic with httpserver