Я описываю свойства в функции конструктора, но когда я вызывал метод Server.request в index.js, он не показывал свойства в
console.log(this)
выводит {} (пустой объект)
Конструктор
function Server(){
  if(!(this instanceof Server)) return new Server()
  this.actions = { // accepted actions
    login: {
      post: [['email', 'username'], 'password']
    },
    register: {
      post: 'name,surname,password,email,haveLicence,licenceKey'.split(',')
    }
  }
}
Функция запроса
Server.prototype.request = (req /* express request object */)=>{
  console.log(this) // {}
  return new Promise((r,j)=>{
    let action = (req.url.match(/[a-z\-]+/i) || [])[0]
    if(!action) return r([400, 'NoAction']);
    action = this.actions[action] // Cannot read property 'register' of undefined.
...
}
