forked from mirrored/github-readme-stats
* Update express.js This will help with containerized deployments and it replicates the behaviour of the vercel app * Update express.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Alexandr <qwerty541zxc@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
24 lines
656 B
JavaScript
24 lines
656 B
JavaScript
import "dotenv/config";
|
|
import statsCard from "./api/index.js";
|
|
import repoCard from "./api/pin.js";
|
|
import langCard from "./api/top-langs.js";
|
|
import wakatimeCard from "./api/wakatime.js";
|
|
import gistCard from "./api/gist.js";
|
|
import express from "express";
|
|
|
|
const app = express();
|
|
const router = express.Router();
|
|
|
|
router.get("/", statsCard);
|
|
router.get("/pin", repoCard);
|
|
router.get("/top-langs", langCard);
|
|
router.get("/wakatime", wakatimeCard);
|
|
router.get("/gist", gistCard);
|
|
|
|
app.use("/api", router);
|
|
|
|
const port = process.env.PORT || process.env.port || 9000;
|
|
app.listen(port, "0.0.0.0", () => {
|
|
console.log(`Server running on port ${port}`);
|
|
});
|