Giter VIP home page Giter VIP logo

Comments (1)

daquinoaldo avatar daquinoaldo commented on June 13, 2024

Hi @dschinkel,
I designed https-localhost to run... well, on localhost 😅
I'm not sure I understand correctly, but it seems to me that you want to use it to serve pages using Heroku, right?
You can't use your own certificate with https-localhost, even if will I'm evaluating this functionality for the future.

To serve file with Heroku, I can suggest you Zeit's serve: it serves only on http connection, but if I remember well, Heroku provide https also for your http server, by default, proxying requests in some way.
If you need a custom server, to provide APIs or other functionality different from just serve static files, or simply to have an advanced configuration, take a look to my index.js file. You can build your own server using this structure. At row 35 replace await getCerts(domain) with an object of this form:

{
  key: fs.readFileSync("certificate.key"),
  cert: fs.readFileSync("certificate.crt")
}

I never tried the certificate management, but I've used Heroku before and I always provided an http server, delegating totally the TLS to Heroku.
I recently deployed this server to bookmarks-notes.herokuapp.com. As you can see, the connection is https.

from https-localhost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.