-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple simultaneous servers (e.g. HTTP and HTTPS) #20
Labels
Comments
kamilmysliwiec
pushed a commit
that referenced
this issue
May 5, 2017
kamilmysliwiec
added a commit
that referenced
this issue
May 5, 2017
Issue #20 / Fix inject by custom value
kamilmysliwiec
pushed a commit
that referenced
this issue
May 23, 2017
Hi @Jephery, let httpsOptions = {
key: fs.readFileSync("./secrets/private-key.pem"),
cert: fs.readFileSync("./secrets/public-certificate.pem")
};
const server = express();
const app = NestFactory.create(ApplicationModule, server);
app.init();
http.createServer(server).listen(3000);
https.createServer(httpsOptions, server).listen(443); |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current implementation of NestApplication.listen() does not support easily adding multiple Server backends, since it directly calls .listen() on the Express Application (which only creates an HTTP server).
At the very least, it would be helpful to add a public method on NestApplication that calls the setup functions (setupMiddleswares, setupRoutes, etc.) without calling express.listen().
For anyone else having this issue, a workaround is below:
The text was updated successfully, but these errors were encountered: