-- Doubts regarding HomeWork5
Well, as I indicated on the homework you can do the homework using express. If you want to use react, just do a search on "http header served with react application" and look at the stack overflow answers. Scrolling down on the first couple it tells you which packages in the dev server used to serve your app need to be adjusted to serve the appropriate header. That said you probably want to do this part of the assignment in express. You don't want to include the packages your project will depend on with your submission or it will be way too big. As I mentioned in class, installing the packages to get the react dev environment set up is a few hundred megabytes (even if your deployed project is much smaller).
For express, you can do something nice and short like:
app.get('/', (req, res) => {
res.setHeader(string_with_header_want_to_send);
})
(
Edited: 2022-12-04)
Well, as I indicated on the homework you can do the homework using express. If you want to use react, just do a search on "http header served with react application" and look at the stack overflow answers. Scrolling down on the first couple it tells you which packages in the dev server used to serve your app need to be adjusted to serve the appropriate header. That said you probably want to do this part of the assignment in express. You don't want to include the packages your project will depend on with your submission or it will be way too big. As I mentioned in class, installing the packages to get the react dev environment set up is a few hundred megabytes (even if your deployed project is much smaller).
For express, you can do something nice and short like:
app.get('/', (req, res) => {
res.setHeader(string_with_header_want_to_send);
})