How do I generate sitemap.xml for node.js prpject

There are posts on this topic but they do not help me to figure out the right way to auto generate sitemap.xml file. My project is a SPA built with node.js and angularjs.

I need to create sitemap.xml and keep it updated. I would much appreciate if someone could help me to learn the proper steps to make it right:

  1. What url should be included?
  2. I create static html for crawlers using prerender -nshould they be also included?
  3. What should NOT be included?