# URL without Port Number

**URL:** <https://openvidu.discourse.group/t/url-without-port-number/1329>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [June 29, 2020, 7:25pm UTC](https://openvidu.discourse.group/t/url-without-port-number/1329 "2020-06-29T19:25:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polygon](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Polygon](https://openvidu.discourse.group/u/Polygon)\
**Post date:** [June 29, 2020, 7:25pm UTC](https://openvidu.discourse.group/t/url-without-port-number/1329/1 "2020-06-29T19:25:56Z")

</div>

I was formerly using Apache to host a site on the same system that OpenVidu is running and all I had to do was update some configuration files to use port 5442 and I was able to access the site without the port number in the URL

Now, I am using Node.js and I have it configured to use the certification files from the directory `/opt/openvidu/certificates`, but I have only been able to access the site if the port number is 4443 and I have to use the port number in the URL. How can I configure Node.js so I can access the site without the port number in the URL as Apache?

Below is an example a server.js file I was able to get working on 4443

```
  1 const fs = require('fs');
  2 const https = require('https');
  3 
  4 const PORT = 4443;
  5 const CERT_PATH = "/opt/openvidu/certificates/";
  6 const certOptions = {
  7 key: fs.readFileSync(CERT_PATH + 'live/openvidu.example.com/privkey.pem'),
  8 cert: fs.readFileSync(CERT_PATH + 'live/openvidu.example.com/cert.pem'),
  9 };
 10 const httpsServer = https.createServer(certOptions, function(req, res){
 11 res.writeHead(200);
 12 res.end("hello");
 13 });
 14 httpsServer.listen(PORT);
```

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [June 30, 2020, 8:30am UTC](https://openvidu.discourse.group/t/url-without-port-number/1329/2 "2020-06-30T08:30:02Z")

</div>

You don’t have to configure any certificate in NodeJS.

You just have to publish Node.js web application in port 5442 so proxy installed with OpenVidu redirect all requests to [https://openvidu.example.com/](https://openvidu.example.com/) to your application.

Take into account that proxy installed with OpenVidu will take care of certificate management.

More information: [https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/](https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/)

Regards
