Completed

Getting an error to run NPM with HTTPS?

I have define options for SSL certificate but I don't how can I use it in code. so I am not getting proper result with HTTPS URL.

Here is my code:

'use strict';

const express = require('express');

const https = require('https'), fs = require("fs");

const socketio = require('[login to view URL]');

const socketEvents = require('./utils/socket');

const options = {

key: [login to view URL]("/www/wwwroot/[login to view URL]"),

cert: [login to view URL]("/www/wwwroot/[login to view URL]")

};

class Server {

constructor() {

[login to view URL] = [login to view URL] || 8099;

[login to view URL] = [login to view URL] || '[login to view URL]';

[login to view URL] = express();

[login to view URL] = [login to view URL]([login to view URL]);

[login to view URL] = socketio([login to view URL]);

}

appRun(){

new socketEvents([login to view URL]).socketConfig();

[login to view URL]([login to view URL](__dirname + '/uploads'));

[login to view URL]([login to view URL], [login to view URL], () => {

[login to view URL](`Listening on https://${[login to view URL]}:${[login to view URL]}`);

});

}

}

const app = new Server();

[login to view URL]();

Skills: Node.js, Socket IO

See more: getting ssl certificate error opening outlook, getting nutch run windows, getting error joomla 404 component found, ansible run shell script on remote host, npm https redirect, smtp error could not connect to smtp host client -> server quit, smtp error could not connect to smtp host. godaddy, smtp error could not connect to smtp host cpanel, smtp error could not connect to smtp host. phpmailer gmail, aws lambda run npm install, whmcs email sending failed - smtp error: could not connect to smtp host., run npm in crontab, smtp error: could not connect to smtp host., vscode run npm script, how to run npm in visual studio code, run npm install on heroku, run ansible playbook on windows host, error msb4019 npm, run npm script from node, smtp error: could not connect to smtp host

About the Employer:
( 5 reviews ) Surendranagar, India

Project ID: #28978273

Awarded to:

chetanj20

In my earlier projects I did configured ssl on nodejs server. I'm having 4+ years of experience in web application development using MERN stack. looking forward to work. thanks!

₹1500 INR in 1 day
(2 Reviews)
2.0