{"size": 533, "ext": "js", "max_stars_repo_path": "src/server/index.js", "max_stars_repo_name": "giri-jeedigunta/SSR-Boilerplate-with-React-Hapi", "max_stars_repo_stars_event_min_datetime": "2019-10-29T05:43:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-29T05:43:57.000Z", "max_issues_repo_path": "src/server/index.js", "max_issues_repo_name": "giri-jeedigunta/SSR-Boilerplate-with-React-Hapi", "max_issues_repo_issues_event_min_datetime": "2021-03-09T21:12:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T01:03:47.000Z", "max_forks_repo_path": "src/server/index.js", "max_forks_repo_name": "giri-jeedigunta/SSR-Boilerplate-with-React-Hapi", "max_forks_repo_forks_event_min_datetime": "2019-10-29T05:21:04.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-29T05:21:04.000Z"}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 21.32, "max_line_length": 50, "alphanum_fraction": 0.564727955}
import Hapi from "@hapi/hapi";
import Inert from "@hapi/inert";
import routes from './routes';

const init = async () => {
  const server = Hapi.server({
    port: 3000
  });

  await server.register(Inert);
  await server.route(routes);
  await server.start();

  console.log("\n------------------------------");
  console.log("  SERVER up and running...");
  console.log("------------------------------");
  console.dir(server.info);
};

process.on("unhandledRejection", err => {
  console.log(err);
  process.exit(1);
});

init();