You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// api.js
var express = require('express');
var drakov = require('drakov')
var drakovMiddleware = require('drakov').middleware;
var port = process.env.PORT || 3000;
var argv = {
sourceFiles: './api.md',
serverPort: port,
staticPaths: [
'static/',
],
stealthmode: false,
delay: 0,
drakovHeader: true,
public: true,
disableCORS: true
};
var app = express();
drakovMiddleware.init(app, argv, function(err, middlewareFunction) {
if (err) {
throw err;
}
app.use(middlewareFunction);
app.listen(argv.serverPort);
});
If I run the script from commandline node api.js, no route would work but the static hosted one.
But, if I am using drakov -f api.md -p 3000 from CLI, all routes would work as expected.
The text was updated successfully, but these errors were encountered:
The code I'm using is from the documentation:
If I run the script from commandline
node api.js
, no route would work but the static hosted one.But, if I am using
drakov -f api.md -p 3000
from CLI, all routes would work as expected.The text was updated successfully, but these errors were encountered: