{"size": 351, "ext": "js", "max_stars_repo_path": "server.js", "max_stars_repo_name": "luisotavio756/api-rest-nodejs-with-mysql", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server.js", "max_issues_repo_name": "luisotavio756/api-rest-nodejs-with-mysql", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server.js", "max_forks_repo_name": "luisotavio756/api-rest-nodejs-with-mysql", "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": 21.9375, "max_line_length": 72, "alphanum_fraction": 0.6809116809}
const express = require('express');
const cors = require('cors');
const requireDir = require('require-dir');

// Init App
const app = express();
app.use(express.json());
app.use(cors());

requireDir("./src/models");


// Pattern Router - Example: localhost:3000/api, this is pattern router.
app.use("/api", require("./src/routes"));

app.listen(3000);