UNPKG

@wbg-mde/express-io

Version:

MDE communication channel with Socket IO and express.

19 lines 686 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const express_1 = require("express"); // Assign router to the express.Router() instance const router = express_1.Router(); // The / here corresponds to the route that the WelcomeController // is mounted on in the server.ts file. // In this case it's /welcome router.get('/', (req, res) => { res.send('contacts'); }); router.get('/:id', (req, res) => { let { id } = req.params; // Greet the given name res.send(`contact - , ${id}`); }); // Export the express.Router() instance to be used by server.ts exports.ContactsRouter = router; //# sourceMappingURL=contactsRouter.js.map