write node api and static server