Setting up KeystoneJS Application with Let's Encrypt and Heroku

I am utilizing the letsencrypt feature of KeystoneJS to conveniently set up and manage HTTPS details for my project. I would like to configure this to function with a custom domain on Heroku. I have followed a previous guide to successfully configure the HTTPS, but when I load HTTPS on my site, it indicates that my certificate is only valid for *.herokuapps.com and not for my actual domain. Do I need to enable the Heroku SSL Beta addon to explicitly make HTTPS work with my domain? If so, how can I provide the required keys and certificates to the addon when my HTTPS information is generated server-side rather than locally? Is there a way to generate this information locally and then share it between Keystone and Heroku?

UPDATE: I have learned that I can manually pass a certificate and key to the SSL options in Keystone. However, I am unsure how I can automatically maintain these certificates unless I initialize them using the letsencrypt option in Keystone. I am still confused about creating the keys/certificates initially, and then relying on letsencrypt to update and communicate the new information with Heroku when necessary.

Answer №1

After much experimentation, I finally managed to upload the Let's Encrypt certificate to Heroku. Although it doesn't happen automatically and must be manually re-uploaded every three months, at least it serves its purpose.

I took the liberty of creating a comprehensive guide addressing this troublesome issue, accessible here. While my instructions were primarily tailored for Windows 10 users, they can also be adapted for Mac OS X/Linux with ease.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for downloading a voice message using the WhatsApp API?

My current task involves creating an endpoint that interacts with the WhatsApp API by making a call using the Media URL format specified in their documentation. The goal is to retrieve the data in the same way it was received from WhatsApp, while also savi ...

Any suggestions on how to handle outdated npm modules when using express generator?

Working on my express website and encountered some warnings: npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3d575c59587d0c130c0c130d">[email protected]</a>: Jade is now pug, please update to th ...

Issues are arising with the functionality of React-native link

After attempting to install and connect react-native sound in my project, I encountered an issue. When executing the following command within my project directory, react-native link react-native-sound the library fails to link and instead returns the fol ...

Issue: Node.js Express unable to access static files when the route is nested more than one folder level deep.Resolution

Before we delve into the question, let me share with you the folder structure of my node.js express app: /home server.js index.html /app /routes public.js /public /css main.css In my server.js file, ...

Configurable BaseUrl in an ExpressJs Application

One issue I am currently facing is setting the base URL for an Express app when it starts up. If I hardcode the base URL, everything works perfectly: app.use("/mybaseurl", routes); However, when I attempt to use a variable that I export at startup, it d ...

Only the final defined document is instantiated by the Swagger-ui-express module

Currently, I am working on a Typescripted nodejs server and facing an issue with defining different swagger paths for separated controllers. The problem is that the swagger-ui-express module only displays the last defined document in the specific route. I ...

The JSON key-value pair is being sent with single quotes enclosing it, from a web form to the Express server and

In my login form, I am sending a username, password, and the h-captcha-response token to express. While the username and password are being sent successfully without single quotes, the h-captcha-response is enclosed in single quotes when it's sent bac ...

What steps do I need to take in order to execute a successful ElasticSearch search query from Node.js?

I am facing an issue where I cannot find the solution to my problem. I need to execute an elasticSearch query from within my node.js application. Strangely, the query works perfectly fine when using Postman, but fails when attempted from node. http://user ...

Gatsby Functions: Exceeding payload size limit error - request entity too large

I am currently working on a Gatsby app and utilizing Gatsby Functions to obscure form submissions to an external API. The issue I am facing is that when a user attaches a file in the form, it could potentially surpass the default size limit of 100KB. While ...

Steps to invoke the Express JS code repository from a serverless repository

Within my current project, there exists various repositories housing Angular code, Express JS (node JS) code, and AWS serverless components. For a specific feature, I am tasked with transferring the 'userId' value from the Angular code to the ser ...

What is the best way to connect a WriteStream and add an extension to it?

I recently started learning about NodeJS and I've discovered the use of the pipe() method for streaming data to the client. Take a look at this code snippet: router.get('/archive/*', function (req, res) { var decodedURI = decodeU ...

Integrating JavaScript into HTML pages with corresponding file names

I am looking for a way to dynamically insert a .js file into an HTML page with the same filename using gulp-inject (for example, injecting index.min.js into index.html and data.min.js into data.html). The minified files are located in build/js and the HTML ...

The act of coming back with just one array

I'm having trouble grasping the concept of returning a single array from a function that calls another function multiple times. The issue I'm facing is that each time the scrapingfunction runs, the console.log in the code provided outputs an arra ...

The function fs.readFileSync does not exist in the context of Meteor and React

Hey there, I'm encountering an issue in Chrome debugger where it says 'fs.readFileSync is not a function' when I try to use readFileSync(); This is how I set it up... const fs = require('fs'); I then proceeded to execute the fun ...

What is the best way to set up jest to generate coverage reports for Selenium tests?

I recently made the switch to using jest for testing my JavaScript project after encountering coverage issues with mocha and chai. While my unit tests are providing coverage data, my Selenium tests are not. I've tried various solutions found in outdat ...

Utilizing node.js, mongoDB, and express.js to upload and recover images

Is there a way to upload an image from my browser and save it as a local file while also adding the file name to mongodb? I want to be able to retrieve the stored file in the local folder and display it in the browser. Thank you, Babji ...

Why is it that when I refresh the page in Angular, my logged-in user is not being recognized? What could be causing this

I am developing a Single Page Application using the combination of Angular JS and Node JS. In my HTML file, I have defined two divs and based on certain conditions, I want to display one of them using ng-if. However, I noticed that the model value used in ...

Instruct npm to search for the package.json within a designated directory

Imagine having a folder structure that looks like this: root |-build |-package.json |-src |-foo |-foo.csproj |-foo.cs |-bar.cs |-bin |-... |-foo.sln Now, if you change the current directory to root\src\foo\bin a ...

Locate an item based on the `Contains` criterion by utilizing Express and Mongoose

Looking to find items in my collection that have userName containing adm. Expecting 2 results based on having records with userNames like admin0 and admin2, but the search returns nothing. The query being used is: Person .find({ userName: { $in: &a ...

NestJS Exporting: Establishing a connection for PostgreSQL multi tenancy

I have been working on implementing a multi tenancy architecture using postgres. The functionality is all in place within the tenant service, but now I need to import this connection into a different module called shops. Can anyone provide guidance on how ...