I'm taking a course that provides the following code:
const router = express.Router();
router
.route('/')
.get(getBootcamps)
.post(createBootcamp)
The above snippet means that GET and POST for the "/" endpoint have different routes.
I've never seen formatting like this so it's strange to me.
Why wouldn't we need separate routes for .get and .post? What is going on under the hood here? How can one be ignored?