Skip to content
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

Allow the app to be run under https #309

Open
pebcakerror opened this issue Aug 13, 2014 · 2 comments
Open

Allow the app to be run under https #309

pebcakerror opened this issue Aug 13, 2014 · 2 comments

Comments

@pebcakerror
Copy link

With lineman run the app can only be accessed from http://localhost:[port]

This makes it nigh impossible to develop apps that tap oAuth2 systems that require the calling app to be secure.

@davemo
Copy link
Member

davemo commented Jan 27, 2015

It looks like this would be possible with a modification to the server task, as per the express API docs:

http://expressjs.com/api.html

The app returned by express() is in fact a JavaScript Function, designed to be passed to Node's HTTP servers as a callback to handle requests. This enables you to provide both HTTP and HTTPS versions of your app with the same code base easily, as the app does not inherit from these (it is simply a callback):

var express = require('express');
var https = require('https');
var http = require('http');
var app = express();

http.createServer(app).listen(80);
https.createServer(options, app).listen(443);

Tagging as an enhancement; I can see this being useful.

@evferrer87
Copy link

Please, anyone know how to config lineman to support https too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants