All Downloads are FREE. Search and download functionalities are using the official Maven repository.

handlebars.nodejs.index.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
'use strict';

var path = require('path');
var http = require('http');

var oas3Tools = require('oas3-tools');
var serverPort = {{serverPort}};

// swaggerRouter configuration
var options = {
    routing: {
        controllers: path.join(__dirname, './controllers')
    },
};

var expressAppConfig = oas3Tools.expressAppConfig(path.join(__dirname, 'api/openapi.yaml'), options);
var app = expressAppConfig.getApp();

// Initialize the Swagger middleware
http.createServer(app).listen(serverPort, function () {
    console.log('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort);
    console.log('Swagger-ui is available on http://localhost:%d/docs', serverPort);
});





© 2015 - 2024 Weber Informatics LLC | Privacy Policy