'use strict'

const sitemap = require('./../index')
const app = require('express')()

// express routing
app.get('/', function(req, res) {
    res.send('hello /')
}).get('/admin', function(req, res) {
    res.send('hello /admin')
}).post('/admin', function(req, res) {
    res.send('hello /admin')
}).get('/duplicate', function(req, res) {
    res.send('hello /duplicate')
}).get('/duplicate/:id', function(req, res) {
    res.send('hello /duplicate')
}).post('/foo', function(req, res) {
    res.send('hello /foo')
}).put('/nooo', function(req, res) {
    res.send('hello /nooo')
})

/*
 * sitemap
 */
app.get('/sitemap', sitemap(app))

// server starting
app.listen(3000)
console.log('starting "sitemap example" on port 3000')
@@ -51,19 +51,23 @@
 )%0Aconst 
-app
+express
  = requi
@@ -79,17 +79,145 @@
 xpress')
-(
+%0A%0Aconst app = express()%0Aconst core = new express.Router()%0Aconst other = new express.Router()%0Aapp.use('/core', core)%0Aapp.use(other
 )%0A%0A// ex
@@ -230,19 +230,20 @@
 routing%0A
-app
+core
 .get('/'
@@ -576,24 +576,30 @@
 plicate')%0A%7D)
+%0Aother
 .post('/foo'
@@ -713,16 +713,78 @@
 /nooo')%0A
+%7D).get('/zas', function(req, res) %7B%0A    res.end('hello /zas')%0A
 %7D)%0A%0A/*%0A 
@@ -830,16 +830,45 @@
 ap(app))
+%0Asitemap.swagger('demo', app)
 %0A%0A// ser

Update example.