'use strict';
'use warning';

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _lodash = _interopRequireDefault(require("lodash"));

var _chalk = _interopRequireDefault(require("chalk"));

var _fs = require("fs");

var _ngrok = _interopRequireDefault(require("ngrok"));

var _localtunnel = _interopRequireDefault(require("localtunnel"));

var _HTTP = _interopRequireDefault(require("./../HTTP"));

var _REACT = _interopRequireDefault(require("./../REACT"));

var _FASTIFY = _interopRequireDefault(require("./../FASTIFY"));

var _EXPRESS = _interopRequireDefault(require("./../EXPRESS"));

var _path = _interopRequireDefault(require("path"));

/**
 * @description Ini Adalah Module Library Yang Berisi Konfigurasi Server Untuk Membangun Sebuah Arsitektur Webserver
 * @example
 *     new Server({
 *         serverEngine : Server.FASTIFY_CORE_ENGINE,
 *           serverState : Server.SERVER_STATE_PRODUCTION,
 *          serverHost : "localhost",
 *           serverPort : 8082,
 *          serverFirebase : mConfig.FirebaseConfig
 *       }, {
 *          entry: (AppEngine, opts, next) => {
 *             AppEngine.register(Themes.Fastify);
 *             AppEngine.register(Api.Fastify, {prefix : "api"});
 *             next();
 *          }
 *    }).start();
 * @see https://facebook.com/dhykavangga
 * @description Class Ini Berisi Tentang Membangun Sebuah Fungsi Web Server Di Dalam DKA Framework
 *
 */
var Server = /*#__PURE__*/function () {
  /**
   * @param {Number} config.serverName  Jenis Web Server Yang Digunakan Dalam Development
   * @param {Boolean} config.serverEnabled Jika Anda Ingin Mematikan Dan Menyalakan Server
   * @param {Number} config.serverEngine  Jenis Web Server Yang Digunakan Dalam Development
   * * @param {Number} config.serverView  Jenis Web Server Yang Digunakan Dalam Development
   * @param {Number} config.serverState Status Server Apakah Pengerjaan Atau Telah Produksi
   * @param {String} config.serverHost Adalah Alamat IP Atau Domain Server Di Akses
   * @param {String} config.serverPort Adalah Alamat Port Web Server
   *
   * @param {Boolean | Object} config.secure Untuk Mengaktifkan SSL atau HTTPS Protocol
   * @param {Object} config.settings Untuk Melakukan Option Tambahan
   *
   * @param {Object} config.settings.ngrok Untuk Melakukan Option Tambahan
   * @param {Object} config.settings.ngrok.enabled Untuk Melakukan Option Tambahan
   * @param {Object} config.settings.ngrok.authToken Untuk Melakukan Option Tambahan
     * @param {Object} config.settings.localtunnel Untuk Melakukan Option Tambahan
   *
   * @param {Object} config.options Untuk Melakukan Option Tambahan
   * * @param {Object} config.options.layoutDir Untuk Melakukan Option Tambahan
   * @param {Object} config.options.templateDir Untuk Melakukan Option Tambahan
   * @param {Object} config.options.assetsDir Untuk Melakukan Option Tambahan
   * * @param {Object} config.options.appDir Untuk Melakukan Option Tambahan
   * @param {Object} config.app Untuk Memulai App Engine Controller
   *
   */
  function Server(config) {
    var _this = this;

    (0, _classCallCheck2["default"])(this, Server);

    /**
     * @const
     * @type {Object}
     */
    this.config = _lodash["default"].extend({
      /** ServerName For Naming App Server **/
      serverName: "",

      /** Server Domain For Naming Service Domain Access **/
      serverDomain: "http://localhost",

      /** Server State Overide Enable and Disabled **/
      serverEnabled: true,

      /** Memilih Jenis Server Engine Yang Ingin Digunakan **/
      serverEngine: Server.FASTIFY_CORE_ENGINE,

      /** Untuk melakukan Set View Template View Di Dalam Framework **/
      serverView: Server.VIEW_POV_EJS,

      /** State Server {Server.SERVER_STATE_DEVELOPMENT | Server.SERVER_STATE_PRODUCTION } **/
      serverState: Server.SERVER_STATE_DEVELOPMENT,

      /** Server Domain Location **/
      serverHost: "localhost",

      /** Server Port **/
      serverPort: 80,

      /** Activated Security System **/
      secure: false,

      /** Memulai System App Controller **/
      app: false,

      /** Setting System Settings **/
      settings: {
        /** Ngrok Tunneling **/
        ngrok: {
          enabled: false,
          authToken: null
        },
        localtunnel: false
      },

      /** Fungsi Untuk Melakukan Asset Delarasion Untuk Menentukan Folder Asets Di Dalam System Data **/
      options: {
        /** Deklarasi Menetapkan Lokasi Assets CSS dan JS Dir Dan Gambar Untuk Aplikasi **/
        layoutDir: _path["default"].join(require.main.filename, "./../Layout"),
        assetsDir: _path["default"].join(require.main.filename, "./../Assets"),
        appDir: _path["default"].join(require.main.filename, "./../Controller"),

        /** Fungsi Untuk Melakukan Folder Upload Di dalam aplikasi **/
        uploadDir: _path["default"].join(require.main.filename, "./../Upload")
        /** **/

      }
    }, config);
    /**
     *
     * @type {Promise<unknown>}
     */

    this.DKAServer = new Promise( /*#__PURE__*/function () {
      var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(resolve) {
        return _regenerator["default"].wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                _context4.t0 = _this.config.serverEngine;
                _context4.next = _context4.t0 === Server.HTTP2_CORE_ENGINE ? 3 : _context4.t0 === Server.EXPRESS_CORE_ENGINE ? 5 : _context4.t0 === Server.FASTIFY_CORE_ENGINE ? 8 : _context4.t0 === Server.RESTIFY_CORE_ENGINE ? 11 : _context4.t0 === Server.REACTJS_CORE_ENGINE ? 12 : 15;
                break;

              case 3:
                //**************************************************/
                (0, _HTTP["default"])(_this.config).then(function (AppEngine) {
                  resolve(AppEngine);
                });
                /***************************************************/

                return _context4.abrupt("break", 15);

              case 5:
                _context4.next = 7;
                return (0, _EXPRESS["default"])(_this.config).then( /*#__PURE__*/function () {
                  var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(AppEngine) {
                    return _regenerator["default"].wrap(function _callee$(_context) {
                      while (1) {
                        switch (_context.prev = _context.next) {
                          case 0:
                            _context.next = 2;
                            return resolve(AppEngine);

                          case 2:
                          case "end":
                            return _context.stop();
                        }
                      }
                    }, _callee);
                  }));

                  return function (_x2) {
                    return _ref2.apply(this, arguments);
                  };
                }());

              case 7:
                return _context4.abrupt("break", 15);

              case 8:
                _context4.next = 10;
                return (0, _FASTIFY["default"])(_this.config).then( /*#__PURE__*/function () {
                  var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(AppEngine) {
                    return _regenerator["default"].wrap(function _callee2$(_context2) {
                      while (1) {
                        switch (_context2.prev = _context2.next) {
                          case 0:
                            _context2.next = 2;
                            return resolve(AppEngine);

                          case 2:
                          case "end":
                            return _context2.stop();
                        }
                      }
                    }, _callee2);
                  }));

                  return function (_x3) {
                    return _ref3.apply(this, arguments);
                  };
                }());

              case 10:
                return _context4.abrupt("break", 15);

              case 11:
                return _context4.abrupt("break", 15);

              case 12:
                _context4.next = 14;
                return (0, _REACT["default"])(_this.config).then( /*#__PURE__*/function () {
                  var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(AppEngine) {
                    return _regenerator["default"].wrap(function _callee3$(_context3) {
                      while (1) {
                        switch (_context3.prev = _context3.next) {
                          case 0:
                            _context3.next = 2;
                            return resolve(AppEngine);

                          case 2:
                          case "end":
                            return _context3.stop();
                        }
                      }
                    }, _callee3);
                  }));

                  return function (_x4) {
                    return _ref4.apply(this, arguments);
                  };
                }());

              case 14:
                return _context4.abrupt("break", 15);

              case 15:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4);
      }));

      return function (_x) {
        return _ref.apply(this, arguments);
      };
    }())["catch"](function (error) {
      if (error) throw error;
    });
    /**
     * @Promise Commit The Function To Listening Server Mode Listening;
     */

    new Promise(function (resolve) {
      _this.DKAServer.then( /*#__PURE__*/function () {
        var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(AppEngine) {
          return _regenerator["default"].wrap(function _callee7$(_context7) {
            while (1) {
              switch (_context7.prev = _context7.next) {
                case 0:
                  if (!(_this.config.app != null)) {
                    _context7.next = 38;
                    break;
                  }

                  _context7.t0 = _this.config.serverEngine;
                  _context7.next = _context7.t0 === Server.EXPRESS_CORE_ENGINE ? 4 : _context7.t0 === Server.FASTIFY_CORE_ENGINE ? 9 : _context7.t0 === Server.REACTJS_CORE_ENGINE ? 30 : _context7.t0 === Server.RESTIFY_CORE_ENGINE ? 35 : 36;
                  break;

                case 4:
                  _context7.next = 6;
                  return AppEngine.use(_this.options.app);

                case 6:
                  _context7.next = 8;
                  return resolve(AppEngine);

                case 8:
                  return _context7.abrupt("break", 36);

                case 9:
                  if (!_this.config.app) {
                    _context7.next = 16;
                    break;
                  }

                  _context7.next = 12;
                  return AppEngine.register( /*#__PURE__*/function () {
                    var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(app, opts, next) {
                      return _regenerator["default"].wrap(function _callee5$(_context5) {
                        while (1) {
                          switch (_context5.prev = _context5.next) {
                            case 0:
                              _context5.next = 2;
                              return app.register(_this.config.app);

                            case 2:
                              _context5.next = 4;
                              return next();

                            case 4:
                            case "end":
                              return _context5.stop();
                          }
                        }
                      }, _callee5);
                    }));

                    return function (_x6, _x7, _x8) {
                      return _ref6.apply(this, arguments);
                    };
                  }());

                case 12:
                  _context7.next = 14;
                  return resolve(AppEngine);

                case 14:
                  _context7.next = 29;
                  break;

                case 16:
                  _context7.next = 18;
                  return console.log(_chalk["default"].white("config `app` functionality is missing. do you want to use the `Controller` folder ? "));

                case 18:
                  if (!(0, _fs.existsSync)(_this.config.options.appDir)) {
                    _context7.next = 25;
                    break;
                  }

                  _context7.next = 21;
                  return AppEngine.register( /*#__PURE__*/function () {
                    var _ref7 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(app, opts, next) {
                      return _regenerator["default"].wrap(function _callee6$(_context6) {
                        while (1) {
                          switch (_context6.prev = _context6.next) {
                            case 0:
                              _context6.next = 2;
                              return app.register(require(_this.config.options.appDir));

                            case 2:
                              _context6.next = 4;
                              return next();

                            case 4:
                            case "end":
                              return _context6.stop();
                          }
                        }
                      }, _callee6);
                    }));

                    return function (_x9, _x10, _x11) {
                      return _ref7.apply(this, arguments);
                    };
                  }());

                case 21:
                  _context7.next = 23;
                  return resolve(AppEngine);

                case 23:
                  _context7.next = 29;
                  break;

                case 25:
                  _context7.next = 27;
                  return console.log(_chalk["default"].white("Directory `Controller` Not Exist. Please Make Dir in " + _this.config.options.appDir + " "));

                case 27:
                  _context7.next = 29;
                  return resolve(AppEngine);

                case 29:
                  return _context7.abrupt("break", 36);

                case 30:
                  _context7.next = 32;
                  return (0, _REACT["default"])(_this.config, _this.config.app);

                case 32:
                  _context7.next = 34;
                  return resolve();

                case 34:
                  return _context7.abrupt("break", 36);

                case 35:
                  return _context7.abrupt("break", 36);

                case 36:
                  _context7.next = 40;
                  break;

                case 38:
                  _context7.next = 40;
                  return resolve(AppEngine);

                case 40:
                case "end":
                  return _context7.stop();
              }
            }
          }, _callee7);
        }));

        return function (_x5) {
          return _ref5.apply(this, arguments);
        };
      }());
    }).then( /*#__PURE__*/function () {
      var _ref8 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(AppEngine) {
        return _regenerator["default"].wrap(function _callee12$(_context12) {
          while (1) {
            switch (_context12.prev = _context12.next) {
              case 0:
                _context12.t0 = _this.config.serverEngine;
                _context12.next = _context12.t0 === Server.EXPRESS_CORE_ENGINE ? 3 : _context12.t0 === Server.FASTIFY_CORE_ENGINE ? 12 : 23;
                break;

              case 3:
                if (!(_this.config.serverState === Server.SERVER_STATE_DEVELOPMENT)) {
                  _context12.next = 8;
                  break;
                }

                _context12.next = 6;
                return AppEngine.listen(_this.config.serverPort);

              case 6:
                _context12.next = 11;
                break;

              case 8:
                if (!(_this.config.serverState === Server.SERVER_STATE_PRODUCTION)) {
                  _context12.next = 11;
                  break;
                }

                _context12.next = 11;
                return AppEngine.listen(_this.config.serverPort);

              case 11:
                return _context12.abrupt("break", 23);

              case 12:
                if (!_this.config.serverEnabled) {
                  _context12.next = 22;
                  break;
                }

                _context12.t1 = _this.config.serverState;
                _context12.next = _context12.t1 === Server.SERVER_STATE_DEVELOPMENT ? 16 : _context12.t1 === Server.SERVER_STATE_PRODUCTION ? 19 : 22;
                break;

              case 16:
                _context12.next = 18;
                return new Promise( /*#__PURE__*/function () {
                  var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(resolve, rejected) {
                    return _regenerator["default"].wrap(function _callee9$(_context9) {
                      while (1) {
                        switch (_context9.prev = _context9.next) {
                          case 0:
                            _context9.next = 2;
                            return AppEngine.listen(_this.config.serverPort, _this.config.serverHost, /*#__PURE__*/function () {
                              var _ref10 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(err, address) {
                                var tunnel;
                                return _regenerator["default"].wrap(function _callee8$(_context8) {
                                  while (1) {
                                    switch (_context8.prev = _context8.next) {
                                      case 0:
                                        if (err) {
                                          _context8.next = 27;
                                          break;
                                        }

                                        if (!(_this.config.settings.ngrok.enabled === true)) {
                                          _context8.next = 6;
                                          break;
                                        }

                                        _context8.next = 4;
                                        return _ngrok["default"].connect({
                                          addr: _this.config.serverPort,
                                          // port or network address, defaults to 80
                                          authtoken: _this.config.settings.ngrok.authToken,
                                          // your authtoken from ngrok.com
                                          onStatusChange: function onStatusChange(status) {
                                            if (status === "connected") {}
                                          },
                                          // 'closed' - connection is lost, 'connected' - reconnected
                                          onLogEvent: function onLogEvent(data) {
                                            console.log(_chalk["default"].white(data));
                                          } // 'closed' - connection is lost, 'connected' - reconnected

                                        });

                                      case 4:
                                        _context8.next = 25;
                                        break;

                                      case 6:
                                        if (!(_this.config.settings.localtunnel === true)) {
                                          _context8.next = 19;
                                          break;
                                        }

                                        _context8.next = 9;
                                        return (0, _localtunnel["default"])({
                                          port: _this.config.serverPort
                                        });

                                      case 9:
                                        tunnel = _context8.sent;
                                        _context8.next = 12;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 12:
                                        _context8.next = 14;
                                        return console.log(_chalk["default"].whiteBright("Berhasil !"), _chalk["default"].whiteBright("Aplikasi \"".concat(_this.config.serverName, "\" Server Dengan Alamat ").concat(address)), "\n", _chalk["default"].whiteBright("LocalTunnel : \"".concat(tunnel.url, "\" Telah Berjalan ")));

                                      case 14:
                                        _context8.next = 16;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 16:
                                        tunnel.on('close', function () {// tunnels are closed
                                        });
                                        _context8.next = 25;
                                        break;

                                      case 19:
                                        _context8.next = 21;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 21:
                                        _context8.next = 23;
                                        return console.log(_chalk["default"].whiteBright("Berhasil  !"), _chalk["default"].whiteBright("Aplikasi \"".concat(_this.config.serverName, "\" Server Dengan Alamat ").concat(address)));

                                      case 23:
                                        _context8.next = 25;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 25:
                                        _context8.next = 28;
                                        break;

                                      case 27:
                                        rejected(err);

                                      case 28:
                                      case "end":
                                        return _context8.stop();
                                    }
                                  }
                                }, _callee8);
                              }));

                              return function (_x15, _x16) {
                                return _ref10.apply(this, arguments);
                              };
                            }());

                          case 2:
                            _context9.next = 4;
                            return resolve();

                          case 4:
                          case "end":
                            return _context9.stop();
                        }
                      }
                    }, _callee9);
                  }));

                  return function (_x13, _x14) {
                    return _ref9.apply(this, arguments);
                  };
                }())["catch"](function (e) {
                  console.log(_chalk["default"].red(" ".concat(e.toString())));
                });

              case 18:
                return _context12.abrupt("break", 22);

              case 19:
                _context12.next = 21;
                return new Promise( /*#__PURE__*/function () {
                  var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(resolve, rejected) {
                    return _regenerator["default"].wrap(function _callee11$(_context11) {
                      while (1) {
                        switch (_context11.prev = _context11.next) {
                          case 0:
                            _context11.next = 2;
                            return AppEngine.listen(_this.config.serverPort, "0.0.0.0", /*#__PURE__*/function () {
                              var _ref12 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(err, address) {
                                var tunnels, tunnel;
                                return _regenerator["default"].wrap(function _callee10$(_context10) {
                                  while (1) {
                                    switch (_context10.prev = _context10.next) {
                                      case 0:
                                        if (err) {
                                          _context10.next = 34;
                                          break;
                                        }

                                        if (!(_this.config.settings.ngrok.enabled === true)) {
                                          _context10.next = 13;
                                          break;
                                        }

                                        _context10.next = 4;
                                        return _ngrok["default"].connect({
                                          addr: _this.config.serverPort,
                                          // port or network address, defaults to 80
                                          authtoken: _this.config.settings.ngrok.authToken,
                                          // your authtoken from ngrok.com
                                          onStatusChange: function onStatusChange(status) {
                                            if (status === "connected") {}
                                          },
                                          // 'closed' - connection is lost, 'connected' - reconnected
                                          onLogEvent: function onLogEvent(data) {} // 'closed' - connection is lost, 'connected' - reconnected

                                        })["catch"](function (e) {
                                          console.log(_chalk["default"].red(" ".concat(e.toString())));
                                        });

                                      case 4:
                                        _context10.next = 6;
                                        return _ngrok["default"].getApi().get('api/tunnels');

                                      case 6:
                                        tunnels = _context10.sent;
                                        _context10.next = 9;
                                        return console.log(_chalk["default"].whiteBright("Aplikasi \"".concat(_this.config.serverName, "\" Server Dengan Alamat ").concat(address, "  -> \"").concat(JSON.parse(tunnels).tunnels[0].public_url, "\" | \"").concat(JSON.parse(tunnels).tunnels[1].public_url, "\" Telah Berjalan ")));

                                      case 9:
                                        _context10.next = 11;
                                        return resolve();

                                      case 11:
                                        _context10.next = 32;
                                        break;

                                      case 13:
                                        if (!(_this.config.settings.localtunnel === true)) {
                                          _context10.next = 26;
                                          break;
                                        }

                                        _context10.next = 16;
                                        return (0, _localtunnel["default"])({
                                          port: _this.config.serverPort
                                        });

                                      case 16:
                                        tunnel = _context10.sent;
                                        _context10.next = 19;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 19:
                                        _context10.next = 21;
                                        return console.log(_chalk["default"].whiteBright("Berhasil  !"), _chalk["default"].whiteBright("Aplikasi \"".concat(_this.config.serverName, "\" Server Dengan Alamat ").concat(address)), "\n", _chalk["default"].whiteBright("LocalTunnel : \"".concat(tunnel.url, "\" Telah Berjalan ")));

                                      case 21:
                                        _context10.next = 23;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 23:
                                        tunnel.on('close', function () {// tunnels are closed
                                        });
                                        _context10.next = 32;
                                        break;

                                      case 26:
                                        _context10.next = 28;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 28:
                                        _context10.next = 30;
                                        return console.log(_chalk["default"].whiteBright("Berhasil  !"), _chalk["default"].whiteBright("Aplikasi \"".concat(_this.config.serverName, "\" Server Dengan Alamat ").concat(address)));

                                      case 30:
                                        _context10.next = 32;
                                        return console.log(_chalk["default"].white("=================================================================================================="));

                                      case 32:
                                        _context10.next = 35;
                                        break;

                                      case 34:
                                        rejected(err);

                                      case 35:
                                      case "end":
                                        return _context10.stop();
                                    }
                                  }
                                }, _callee10);
                              }));

                              return function (_x19, _x20) {
                                return _ref12.apply(this, arguments);
                              };
                            }());

                          case 2:
                          case "end":
                            return _context11.stop();
                        }
                      }
                    }, _callee11);
                  }));

                  return function (_x17, _x18) {
                    return _ref11.apply(this, arguments);
                  };
                }())["catch"](function (e) {
                  console.log(_chalk["default"].red(" Server Error ".concat(e.toString())));
                });

              case 21:
                return _context12.abrupt("break", 22);

              case 22:
                return _context12.abrupt("break", 23);

              case 23:
              case "end":
                return _context12.stop();
            }
          }
        }, _callee12);
      }));

      return function (_x12) {
        return _ref8.apply(this, arguments);
      };
    }());
  }

  (0, _createClass2["default"])(Server, null, [{
    key: "SERVER_STATE_DEVELOPMENT",
    get:
    /**
     *
     * @returns {string}
     * @constructor
     * @description Opsi Ini Dipilih Saat Anda AKan Menetapkan Status Server Ke Posisi Pengembangan.
     */
    function get() {
      return "dev";
    }
    /**
     *
     * @returns {string}
     * @constructor
     * @description Opsi Ini Dipilih Saat Anda AKan Menetapkan Status Server Ke Posisi Produksi
     */

  }, {
    key: "SERVER_STATE_PRODUCTION",
    get: function get() {
      return "prod";
    }
    /***********************
    /**
     *
     * @returns {number}
     * @constructor
     */

  }, {
    key: "HTTP2_CORE_ENGINE",
    get: function get() {
      return 1;
    }
    /**
     *
     * @returns {number}
     * @constructor
     */

  }, {
    key: "EXPRESS_CORE_ENGINE",
    get: function get() {
      return 2;
    }
    /**
     * @static
     * @returns {number}
     * @constructor
     */

  }, {
    key: "FASTIFY_CORE_ENGINE",
    get: function get() {
      return 3;
    }
    /**
     * @static
     * @returns {number}
     * @constructor
     */

  }, {
    key: "RESTIFY_CORE_ENGINE",
    get: function get() {
      return 4;
    }
    /**
     *
     * @returns {number}
     * @constructor
     */

  }, {
    key: "REACTJS_CORE_ENGINE",
    get: function get() {
      return 5;
    }
  }, {
    key: "VIEW_POV_EJS",
    get: function get() {
      return 1;
    }
  }, {
    key: "VIEW_POV_MUSTACHE",
    get: function get() {
      return 2;
    }
  }, {
    key: "HOST_LOCALHOST",
    get: function get() {
      return 1;
    }
  }]);
  return Server;
}();

var _default = Server;
exports["default"] = _default;
//# sourceMappingURL=classBased.js.map