{"size": 648, "ext": "js", "max_stars_repo_path": "app.js", "max_stars_repo_name": "goyal-Dushi/goyal-Dushi.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app.js", "max_issues_repo_name": "goyal-Dushi/goyal-Dushi.github.io", "max_issues_repo_issues_event_min_datetime": "2021-05-31T06:10:38.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-21T17:18:57.000Z", "max_forks_repo_path": "app.js", "max_forks_repo_name": "goyal-Dushi/portfolio_website", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 7, "max_forks_count": null, "avg_line_length": 23.1428571429, "max_line_length": 58, "alphanum_fraction": 0.6327160494}
const express = require("express");
const path = require("path");
require("dotenv").config();

const app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname + "/public")));
const TEST_PORT = 8080;

app.get("/", function (req, res) {
  res.sendFile("/index.html");
});

app.get("/download", function (req, res) {
  res.download(
    __dirname + "/upload_folder/Resume.pdf",
    "Dushyant_Resume.pdf",
    (error) => {
      console.log("Error :", error);
    }
  );
});

app.listen(process.env.PORT || TEST_PORT, () => {
  console.log("Server started on Port 8080");
});
