UNPKG

leafage

Version:

The React Server Side Render Framework

44 lines (40 loc) 1.25 kB
/** * leafage v1.3.1 * * Copyright (c) Leafage. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ 'use strict'; var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js'); var toolkit = require('@leafage/toolkit'); var server = require('@leafage/server'); var utils = require('../common/utils.js'); var start = /*#__PURE__*/function () { var _ref = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee() { var options, opt, context, server$1, _args = arguments; return _rollupPluginBabelHelpers.regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; opt = toolkit.getConfig(options); context = utils.createContext(opt); server$1 = server.createServer(context); server$1.start(); case 1: return _context.a(2); } }, _callee); })); return function start() { return _ref.apply(this, arguments); }; }(); exports.start = start;