{"size": 587, "ext": "js", "max_stars_repo_path": "server/server.js", "max_stars_repo_name": "andikabahari/mern-jwt-auth", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/server.js", "max_issues_repo_name": "andikabahari/mern-jwt-auth", "max_issues_repo_issues_event_min_datetime": "2020-06-02T07:27:45.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T06:00:44.000Z", "max_forks_repo_path": "server/server.js", "max_forks_repo_name": "andikabahari/mern-jwt-auth", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 22.5769230769, "max_line_length": 66, "alphanum_fraction": 0.6592844974}
const path = require("path");

// base path
global.__basepath = process.cwd();

if (!require("fs").existsSync(path.join(__basepath, "server.js")))
  global.__basepath = path.join(__basepath, "server");

// config
global._config = {
  app: require("./config/app.js"),
  db: require("./config/db.js"),
  jwt: require("./config/jwt.js")
};

// helpers
global._url = require("./helpers/_url.js");
global._response = require("./helpers/_response.js");

// app
const app = require("./app.js");

app.listen(_config.app.port, () =>
  console.log(`Server running on port ${_config.app.port}`)
);
