Skip to content

:port (3000) to :port(5000) communication using Node.js.

Notifications You must be signed in to change notification settings

devkayes/all-about-port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Following recourses are used in this project:

https://birdeatsbug.com/blog/object-oriented-programming-in-typescript

Code Example :-

    var server = net.createServer();

    server.once('error', function(err) {
    if (err.code === 'EADDRINUSE') {
        // port is currently in use
    }
    });

    server.once('listening', function() {
    // close the server if listening doesn't fail
    server.close();
    });

    server.listen(/* put the port to check here */);

node-portfinder:-

https://github.com/http-party/node-portfinder/blob/master/lib/portfinder.js

About

:port (3000) to :port(5000) communication using Node.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published