Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mahmoudrasmy/https-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to create a nodejs script to implement https

Pre-requistes

  • Install nodejs

    • $sudo apt-get update
    • $sudo apt-get install nodejs
    • $sudo apt-get install npm
  • Download and install OpenSSL https://www.openssl.org/source/

  • Generate the certificate and the key using the below commands

$\OpenSSL_Dir\openssl genrsa -out localhost.key 2048
$\OpenSSL_Dir\openssl req -new -x509 -key localhost.key -out localhost.cert -days 3650 -subj /CN=localhost -config "Open_SSL_Dir\openssl-0.9.8h-1-bin\share\openssl.cnf"

Steps

  • $npm install
  • $node app.js

Refrences

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published