This code works:
const express = require('express');
const Router = express.Router();
Router.get('/hello-world', (req, res, next) => {
res.send("hello world!"); //works great
});
But this code doesn't:
const {Router} = require('express');
Router.get('/hello-world', (req, res, next) => {
res.send("hello world!"); // :( doesnt work
});
What am I misunderstanding about destructuring? Thanks