forked from mirrored/github-readme-stats
feat: update express.js to support containerized deployments + replicate the behaviour of the vercel app (#4345)
* 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>
This commit is contained in:
co-authored by
Copilot
Alexandr
parent
0d60641b7c
commit
ed942e846c
+13
-6
@@ -7,10 +7,17 @@ import gistCard from "./api/gist.js";
|
||||
import express from "express";
|
||||
|
||||
const app = express();
|
||||
app.listen(process.env.port || 9000);
|
||||
const router = express.Router();
|
||||
|
||||
app.get("/", statsCard);
|
||||
app.get("/pin", repoCard);
|
||||
app.get("/top-langs", langCard);
|
||||
app.get("/wakatime", wakatimeCard);
|
||||
app.get("/gist", gistCard);
|
||||
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}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user