Skip to main content

Mastering node async with Promised as a Class

var promisedClass = new class PromisedClass {
constructor() {
this._promise = new Promise((resolve, reject) => {
this.set = (val) => resolve(val)
this.reject = (val) => reject(val)
})
}
}

Popular posts from this blog

CyberPanel without port 8090 and with a hostname

HOW TO REMOVE PORT 8090 FROM CYBERPANEL   December 25, 2018    Usmannasir   Comments   4 Comments Many of the users have asked about removing port 8090 so that they can visit CyberPanel on a plain domain like  panel.cyberpanel.net . However, normally this is not possible because port 8090 is hardcoded into to LSCPD server which powers CyberPanel. (Hardcoded configurations are used to improve performance) Step 1: Create a Website for Hostname First, you need to decide the domain on which you want to access CyberPanel without the port being appended to it. We are going to use  https://switch.cyberpanel.net. Now  create a website  for this domain (hostname). Please make sure that A record of this domain already points towards your server. Step 2: Issue Hostname SSL We now need to issue  Hostname SSL  for the domain we choose above. In our example it is  https://switch.cyberpanel.net . Setup CyberPanel without ...