backend library now complete
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import express from 'express';
|
||||
import { getExamples, uploadExample } from './../controllers/controller.js'; // import request & response function
|
||||
|
||||
// initialize router
|
||||
const router = express.Router();
|
||||
|
||||
/*
|
||||
request methods ---> https://www.tutorialspoint.com/http/http_methods.htm
|
||||
1st param = extended url path
|
||||
2nd param = middlewares (optional)
|
||||
3rd param = request & response function (controller)
|
||||
*/
|
||||
router.get('/', (request, response, next) => next(), getExamples); // current path: http://localhost:8080/example
|
||||
router.post('/upload', (request, response, next) => next(), uploadExample); // current path: http://localhost:8080/example/upload
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user