My idea is to split the client static files and the nodejs server. In production i will most likely serve the static files from nginx directly and proxy everything with an /api/ route to the node app.
In development I thought I can achieve the same by a simple nodejs app but i have no idea how to set this up. Currently my client files are serverd on port 9000 via a grunt dev server and the api is on port 3000. Is there an easy way to write a node app which redirects every request which doesn't start with /api/ to port 9000 and all other traffic to port 3000?