diff --git a/server/routes/route.js b/server/routes/route.js index 98c7875..4068436 100644 --- a/server/routes/route.js +++ b/server/routes/route.js @@ -1,5 +1,5 @@ import express from 'express'; -import getExamples from './../controllers/controller.js'; // import request & response function +import { getExamples, uploadExample } from './../controllers/controller.js'; // import request & response function const router = express.Router(); // initialize router @@ -7,6 +7,7 @@ const router = express.Router(); // initialize router 1st param = extended path location 2nd param = request & response function */ -router.get('/examples', getExamples); // current path: http://localhost:8080/examples +router.get('/', getExamples); // current path: http://localhost:8080/example +router.post('/upload', uploadExample); // current path: http://localhost:8080/example/upload export default router;