CodeGenieApp / CodeGenieApp/serverless-express

Swagger ui is not loaded

Aperta
#705 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
5.3k
Fork
676
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello team,

Currently am using aws-serverless-express, but in latest npm its not working, so migrating the @codegenie/serverless-express npm with custom re route npm.

From api gateway url, normal end points are working fine, but swagger only not loading.

lambda.js
const app = require('./server')
const serverlessExpress = require('@codegenie/serverless-express')
exports.handler = serverlessExpress({ app })

server.js
var express = require('express');
var app = express();
var path = require('path');
app.use('/v1/mints/docs/api.json', express.static(path.join(__dirname, '/docs/mints-api-v1.json')));
const pathToSwaggerUi = require('swagger-ui-dist').absolutePath()
app.use('/v1/mints/docs/', express.static(pathToSwaggerUi))

module.exports = app

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.