Preact-cli: preact serve without https

Created on 7 Oct 2017  路  2Comments  路  Source: preactjs/preact-cli

Is there a way to run preact serve without https?
In my server I'm already proxying the requests from 443 to my PORT environment variable

preact serve command does not allow --https false option.

Thanks.

question

Most helpful comment

Hi there - the server we spawn (simplehttp2server) only supports HTTPS. However, you can instead spawn superstatic, which is HTTP:

npm install --save superstatic
preact serve --server superstatic

It should respect $PORT by default.

All 2 comments

Hi there - the server we spawn (simplehttp2server) only supports HTTPS. However, you can instead spawn superstatic, which is HTTP:

npm install --save superstatic
preact serve --server superstatic

It should respect $PORT by default.

@developit thanks. it works.

Was this page helpful?
0 / 5 - 0 ratings