Open piyushgarg opened 11 months ago
This is more of a documentation point to be added as I was not able to find how to run scanserv in https/ssl certificate. Not very good at node paradigm, so please change. Edit server.js
#!/usr/bin/env node const fs = require('fs'); const https = require('https') const options = { cert: fs.readFileSync('/usr/lib/scanservjs/config/fullchain.pem'), key: fs.readFileSync('/usr/lib/scanservjs/config/privkey.pem') }; const express = require('express'); const application = require('./application'); const ExpressConfigurer = require('./express-configurer'); const config = application.config(); const app = express(); ExpressConfigurer.with(app) .encoding() .statics() .basicAuth() .swagger() .endpoints(); const sslServer = https.createServer(options, app); sslServer.listen(config.port, () => { }) sslServer.setTimeout(config.timeout);
it'd be probably better to just use a reverse proxy like nginx for that
This is more of a documentation point to be added as I was not able to find how to run scanserv in https/ssl certificate. Not very good at node paradigm, so please change. Edit server.js