template for compile and serve