{"size": 598, "ext": "js", "max_stars_repo_path": "frontend/app.js", "max_stars_repo_name": "osamhack2021/Web_Handover_Handover", "max_stars_repo_stars_event_min_datetime": "2021-10-04T07:56:16.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-17T05:14:43.000Z", "max_issues_repo_path": "frontend/app.js", "max_issues_repo_name": "osamhack2021/Web_Handover_Handover", "max_issues_repo_issues_event_min_datetime": "2021-09-12T13:57:00.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-18T09:53:12.000Z", "max_forks_repo_path": "frontend/app.js", "max_forks_repo_name": "osamhack2021/Web_Handover_TeamName", "max_forks_repo_forks_event_min_datetime": "2021-09-14T12:43:38.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-07T15:10:47.000Z"}
{"max_stars_count": 9, "max_issues_count": 97, "max_forks_count": 7, "avg_line_length": 27.1818181818, "max_line_length": 63, "alphanum_fraction": 0.7090301003}
const express = require("express");
const path = require("path");

require("./config/environment");

const assetFolder = path.resolve(__dirname, "./dist/");
const port = process.env.PORT;
const app = express();

// serve static assets normally
app.use(express.static(assetFolder));

// handle every other route with index.html, which will contain
// a script tag to your application's JavaScript file(s).
app.get("*", function (request, response) {
  response.sendFile(path.join(assetFolder, "index.html"));
});

app.listen(port, () =>
  console.log(`React server is listening on port ${port}`)
);
