Save p5js-Script to ipfs with correct MimeType

Hello everyone,

I want to save a p5js Script to ipfs with node.js

It is necassary to store the script in a string value. What is the smartest way to set the Mimetype to application/javascript so the Browser is able to render the script.

Thanks in advance,