Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js HTTPS Server with Clustering

This project demonstrates how to set up an HTTPS server in Node.js with SSL/TLS support, clustering to utilize multiple CPU cores, and error handling.

Features

  • HTTPS server with SSL/TLS encryption.
  • Clustering support to use all available CPU cores for better performance.
  • Graceful error handling to avoid crashing on uncaught exceptions or unhandled rejections.

Prerequisites

Before running the server, you need to have the following:

  • Node.js installed (version 12 or higher recommended).
  • A valid SSL certificate (cert.pem) and private key (key.pem).

Installation

  1. Clone this repository:

    git clone https://github.com/NetroIndonesia/https.js.git
  2. Navigate to the project directory:

    cd https.js
  3. Install necessary dependencies (if applicable):

    npm install
  4. Place your SSL certificate and private key in a cert/ directory:

    • cert/key.pem: Your private key file.
    • cert/cert.pem: Your certificate file.

Usage

To start the server, run the following command:

node index.js

Social Media: 📡

Join me on Telegram.

Telegram Badge

About

This project creates a Node.js HTTPS server with SSL/TLS encryption and clustering to utilize multiple CPU cores. It includes error handling for client errors, uncaught exceptions, and unhandled rejections, making it suitable for secure and scalable web applications.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages