linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 83 forks source link

Allow the app to be run under https #309

Open pebcakerror opened 9 years ago

pebcakerror commented 9 years ago

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 commented 9 years ago

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 commented 6 years ago

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