{"size": 685, "ext": "js", "max_stars_repo_path": "src/utils/server/startServer.js", "max_stars_repo_name": "mattcarlotta/react-ssr-kit", "max_stars_repo_stars_event_min_datetime": "2019-03-18T10:18:29.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-23T03:56:03.000Z", "max_issues_repo_path": "src/utils/server/startServer.js", "max_issues_repo_name": "mattcarlotta/react-ssr-kit", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/server/startServer.js", "max_forks_repo_name": "mattcarlotta/react-ssr-kit", "max_forks_repo_forks_event_min_datetime": "2019-04-22T13:19:37.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-24T14:51:38.000Z"}
{"max_stars_count": 10, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 31.1363636364, "max_line_length": 83, "alphanum_fraction": 0.3810218978}
import Loadable from "react-loadable";
import openBrowser from "react-dev-utils/openBrowser";
import chalk from "chalk";
import { HOST, PORT } from "../../../envs";

//= =============================================================================//
// STARTS EXPRESS SERVER                                                          /
//= =============================================================================//

export default app => {
  Loadable.preloadAll().then(() => {
    app.listen(PORT, HOST, err => {
      if (!err) {
        const url = `http://${HOST}:${PORT}`;
        openBrowser(url);
      } else {
        console.error(chalk.red(err));
      }
    });
  });
};
