Using Let's encript SSL certificates on OpenShift for node app - node.js

I have a node/socket.io chat app on OpenShift. The directory layout is the following:
I would like to start using SSL on the site, specifically with Let's Encrypt, which is free. However, no matter how many tutorials I Google and try out (on a separate hosting for testing, of course), I simply can't make it work properly.
I'm sure to some this is a silly question, but I'd appreciate if someone could tell me how to do this with OpenShift.
If anyone knows of an easy to understand, step by step tutorial, I would appreciate a link.

Related

Can someone clone a site if using Firebase as backend?

I am surprised nobody has ever asked this, so here it is
If you are programming a webapp and you use Firebase as your only backend, can’t someone just download your frontend and then “fork” or clone your app? Someone would only need to create a new Firebase app and change the connection settings for him to create a clone of your project, right?
Obviously if you were coding an iOS or Android native app it would be harder as he would not have access to the original client code, but when talking about websites this really looks like a problem to me
Please tell me if there’s something I’m missing that would prevent someone from doing that

How do I get my Shopify App from my local dev server to their server?

First off, I'm really, really sorry if this has been asked before, but I did not find a satisfying answer. This step seems missing / unthreatened in literally all explanations and tutorials out there.
I've read literally everything about making a Shopify App and I've built one and it works. I'm in the stage of submitting it, but I discovered the project directory is about 40k+ files large. When debugging the App, I ran the test server over ngrok over my local laptop, but it's kind of self explaining that I won't keep it running there 24/7 for the next 50 years.
After reading all guides, I still lack in one important information.
How is my app being pushed/pulled/deployed to their server? What exactly do I do to achieve this, and furthermore, how do I update bugfixes afterwards?
I am aware there is a review process and everything, the question is, when and how does my local app version move over to their servers. exactly?
I was really not able to find satisfying answers to this.
Help greatly appreciated.
You have to host your application on your own server be it a Public app or Custom app.
Public APP
They will review the approach not the code, they can't see your code,
it's deployed on your server.
In shopify developer account open create public app form, add your app urls.
Submit your app for approval.
Custom APP
They won't review anything, just deploy your app on your server and
add your links in the custom app form.

Node.Js app cannot be deployed to Heroku successfully

There's this tutorial which has a working chat app. You can find the chat app on GitHub.
I'm trying to deploy the git code to Heroku without success.
The GitHub is separated to client/server architecture so it requires to start node server and ng serve to client. Do I need 2 dynos for it? Do I need to edit the Procfile? The server is using process.env.PORT but the client one is hardcoded.
I'm very new to Heroku and Node.js so any help is meaningful to me.
The GitHub project that you ask about is pretty complex and it doesn't seem to have ane Heroku deployment instructions, without knowing the project it's hard to give you any concrete solution, but I'll try to answer in general how such applications are usually deployed and hopefully it will help you solve your problems.
For applications like this it is common to split the backend and the frontend part and have it deployed and hosted separately, either as two separate dynos if you want to host both on Heroku, or e.g. hosting the backend part on Heroku and the frontend part on Netlify or a similar service.
Another option could be to make the backend serve the frontend e.g. on the / path while having all of the backend endpoints available as /api/* or something similar (or on a different port but this is not possible on Heroku). Having it on the same host and port but with a prefix for the api has the advantage of simplifying the CORS related matters, as the origin is the same so no cross-origin issues arise.
If you're using WebSockets then it is slightly more complicated - make sure to read:
https://devcenter.heroku.com/articles/websockets
but either way you can still move your frontend to Netlify or something similar and keep the backend on Heroku if you want.
It's hard to give you any more specific answer to this question. I see that you are new here, so next time try to write a more specific question and narrow down the problem so that you can show a small code example that people could actually read and help you.

Using Nodejs with IIS for REST service using Express

We're using Nodejs + Express to create a RESTful web service. During testing we kicked off the service via the command-line, i.e., node mim.js and and tested the service using http://server:9999/mim/GetEmployeeData and that works fine.
The node application lives in inetpub\wwroot\myapps\mim and we want to be able to access it like so:
http://apps.mydomain.com/mim/GetEmployeeData
We're not quite sure how to get this to work with IIS, however. Looking for some help with respect to this.
Thanks in advance!
See this Hosting node.js applications in IIS on Windows tutorial:
https://github.com/tjanczuk/iisnode
It explains many different scenarios and since you din't post a lot of details it's hard to give you a more detailed answer other than pointing you to a good documentation about the thing that you're trying to do.

Configuring KeystoneJS App with LetsEncrypt & Heroku

I'm using the letsencrypt option of KeystoneJS to automatically configure and maintain HTTPS information for my project. I'd like to be able to configure this to work with a custom domain on Heroku; I've followed a previous guide to actually configure the HTTPS (which appears to work), but when I load HTTPS on my site, it says that my certificate is only applicable for *.herokuapps.com, and not for my actual domain. Do I need to configure the Heroku SSL Beta addon in order for HTTPS to explicitly work with my domain? If I do, how can I provide it with the keys and certificates that it asks for, even though my HTTPS information is being generated on the server and not locally? (Rather, how might I be able to generate that information locally, then have both Keystone and Heroku use identical information)?
EDIT: As I understand it, I can manually pass a certificate and key to the SSL options in Keystone, but I have no way of automatically maintaining those certificates unless I instantiate them with the letsencrypt Keystone option (as far as I know). I'm still confused how I can manually create the keys/certificates the first time, then use letsencrypt to maintain and update them (and then communicate the new information with Heroku when they need to be updated).
I ended up figuring out how to upload the certificate to Heroku after creating it with Let's Encrypt. It isn't automatic and needs to be manually re-uploaded every three months, but it's better than nothing.
I wrote a guide about how to solve this issue, which you can read here. I used Windows 10 for the process, but it should be fine on Mac OS X/Linux as well.

Resources