Step-by-step process to arrange your apps
Let’s get began with making a contemporary Remix app.
Remix will ask you the title of your challenge, app sort, and deployment sort (server).
Select Categorical Server from the choices.
Firstly if you happen to don’t have a self-signed key and cert please create them first.
openssl in your OS.
brew set up openssl
For Debian and Ubuntu:
sudo apt set up openssl
For CentOS and Fedora:
sudo yum set up openssl
Now create key and cert:
openssl req -newkey rsa:4096
Additionally, it is best to add your cert to trusted certificates:
sudo safety add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./localhost.crt
Your app now ought to comprise a file named
server.js. Open the file and begin to edit it.
Simply import the
readFileSync from the native
fs module of Node.js.
https object that comprises the important thing and cert. Then simply use createServer to create a Node Server and go the
https object as the primary argument and the Categorical app because the second argument.
That’s it, simply go to https://127.0.0.1:3000 and also you’ll have a self-signed SSL in your localhost.