rpc ready, fix promise chain bug. refactor server
refactor: examples as apps