example: route, controller, model

This commit is contained in:
Ben Elferink
2020-12-22 02:11:43 +02:00
parent d389451be2
commit fedda7b932
4 changed files with 50 additions and 1 deletions

13
server/routes/route.js Normal file
View File

@@ -0,0 +1,13 @@
import express from 'express';
import getExamples from './../controllers/controller.js'; // import request & response function
const router = express.Router(); // initialize router
/*
1st param = extended path location
2nd param = request & response function
current link: http://localhost:8080/examples
*/
router.get('/examples', getExamples);
export default router;