move cli server into serve file