{"size": 596, "ext": "js", "max_stars_repo_path": "server/src/index.js", "max_stars_repo_name": "bkdev98/upload.innoteq.vn", "max_stars_repo_stars_event_min_datetime": "2019-06-12T06:20:29.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-08T05:05:29.000Z", "max_issues_repo_path": "server/src/index.js", "max_issues_repo_name": "bkdev98/upload.innoteq.vn", "max_issues_repo_issues_event_min_datetime": "2019-06-12T06:54:06.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T11:45:12.000Z", "max_forks_repo_path": "server/src/index.js", "max_forks_repo_name": "bkdev98/upload.innoteq.vn", "max_forks_repo_forks_event_min_datetime": "2019-08-05T12:43:42.000Z", "max_forks_repo_forks_event_max_datetime": "2019-08-05T12:43:42.000Z"}
{"max_stars_count": 5, "max_issues_count": 15, "max_forks_count": 1, "avg_line_length": 23.84, "max_line_length": 74, "alphanum_fraction": 0.6761744966}
import express from 'express';
import path from 'path';
import 'dotenv/config';

import constants from './config/constants';
import configMiddleware from './config/middlewares';
import './config/database';
import routesConfig from './module';

const app = express();

app.use(express.static(path.join(__dirname, '/../../client/build')));

configMiddleware(app);

routesConfig(app);

app.get('*', (req,res) => {
    res.sendFile(path.join(__dirname + '/../../client/build/index.html'));
});

app.listen(constants.PORT, () => console.log(`
    Service is up on port ${constants.PORT} 🐳
    ---`));
