It's express middleware. Just pass path to file sitemap.xml and this module will return him.
Installation:
npm i --save sitemap.xml
Require:
var sitemap = require('sitemap.xml');
And finally:
app.use(sitemap(__dirname + '/sitemap.xml'));
The module takes one parameter - a path to file sitemap:
none