- Rewrite server side in pure js