use main script as server