Skip to content

Tag: express

MIME type error with express.static and CSS files

I’m using Express and NodeJS. In my server.js file I have this piece of code: And subsequently in my static directory, I have a CSS folder, and then a style.css file. In my index.html, I link to the sheet like so: However, in my test environment I continue to get this error: Refused to apply style from …

understanding body parameters in javascript

im having difficulty understanding how form data are taken in javascript. For example: are firstName and lastName id’s from the html used to identify what field the data is coming from? Thank you! Answer We can’t really tell based on what you posted, if it is a direct form post (and not AJAX), the…