commit 5642b4ad6919703dd29f2778d5ceaecc4617f2d9
parent 32524f026f7bd55996293ca80668928ae510346f
Author: AMIT DUTTA <amitdutta4255@gmail.com>
Date: Tue, 7 Oct 2025 21:44:38 +0530
Refactor server.js to add new API endpoints
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
@@ -63,10 +63,10 @@ app.get('/api/programs', async (req, res) => {
}
});
-// NEW API endpoint to fetch data from the "tution-c" folder
-app.get('/api/tution-c', async (req, res) => {
+// NEW API endpoint to fetch data from the "tuition-c" folder
+app.get('/api/tuition-c', async (req, res) => {
try {
- const folder = 'tution-c';
+ const folder = 'tuition-c';
const result = await fetchGitHub(`${GITHUB_API_URL}/contents/${folder}`);
if (!result.ok) {
@@ -118,3 +118,4 @@ app.get('/health', (req, res) => {
app.listen(port, () => {
console.log(`Server listening at http://localhost:${port}`);
});
+