{"size": 514, "ext": "js", "max_stars_repo_path": "src/server.js", "max_stars_repo_name": "olgeorge/node-react-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/server.js", "max_issues_repo_name": "olgeorge/node-react-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/server.js", "max_forks_repo_name": "olgeorge/node-react-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.347826087, "max_line_length": 62, "alphanum_fraction": 0.6361867704}
const express = require("express");
const app = express();
const routes = require('./routes');
const bodyParser = require('body-parser');

app.use(bodyParser.json());

app.use('/api/', routes);

const clientPath = __dirname + '/client/';

app.use("/public", express.static(clientPath + 'public'));

app.get("/", (req, res) => {
  res.sendFile(clientPath + "index.html");
});

app.use("*", (req, res) => {
  res.sendFile(clientPath + "404.html");
});

app.listen(8080, () => console.log("Listening on port 8080"));
