/** * Created by cmiles on 8/9/2017. */ var express = require('express'); var router = express.Router(); var fs = require('fs'); var template_render = require('../lib/render_template.js'); router.get('/', function(req, res, next) { /* Get Active Leases */ get_active_leases = template_render.get_template("api_examples"); get_active_leases = template_render.set_template_variable(get_active_leases, "title", "Get Active Leases"); example_body = 'URL: /api/get_active_leases

'; example_body = example_body + ' '; example_body = example_body + '

'; example_body = example_body + '
'; get_active_leases = template_render.set_template_variable(get_active_leases, "example_body", example_body); /* Get Subnet Details */ get_subnet_details = template_render.get_template("api_examples"); get_subnet_details = template_render.set_template_variable(get_subnet_details, "title", "Get Subnet Details"); example_body = 'URL: /api/get_subnet_details

'; example_body = example_body + ' '; example_body = example_body + '

'; example_body = example_body + '
'; get_subnet_details = template_render.set_template_variable(get_subnet_details, "example_body", example_body); res.send ( template_render.get_index_template( get_active_leases + get_subnet_details , req.url ) ); }); module.exports = router;