added support for starting server on prod or dev