UNPKG

leafage

Version:

The React Server Side Render Framework

42 lines (39 loc) 1.19 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 */ import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../_virtual/_rollupPluginBabelHelpers.js'; import { getConfig } from '@leafage/toolkit'; import { createServer } from '@leafage/server'; import { createContext } from '../common/utils.js'; var start = /*#__PURE__*/function () { var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() { var options, opt, context, server, _args = arguments; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; opt = getConfig(options); context = createContext(opt); server = createServer(context); server.start(); case 1: return _context.a(2); } }, _callee); })); return function start() { return _ref.apply(this, arguments); }; }(); export { start };