node package manager

paradigm-site-sitemap

paradigm-site-sitemap

Express middleware for a Paradigm site's sitemap.

Usage

Create the express middleware by passing an api configuration object to this module's main export. The api configuration object must contain host and version.

Example

var api = {
  host: 'http://paradigm-api.f12.global',
  version: process.env.API_VERSION
};
 
var express = require('express');
var app = new express();
 
var sitemap = require('paradigm-site-sitemap');
 
app.use(`/sitemap.xml`, sitemap(api));