I'm using NodeJS and Express and I have a .unity3d file that won't run because I'm pretty sure NodeJS doesn't recognize it. I researched it and I'm pretty sure it has something to do with NodeJS needing to be served the unity3d file type before it can run it. The MIME type for Unity webplayer content is: application/vnd.unity
.
And the file extension for unity webplayer files is: .unity3d
So, if I was editing htaccess files on my server, I would have to add this: AddType application/vnd.unity unity3d
How can I do this in NodeJS and express??
For the built-in Express static file serving middleware, you should be able to add it by:
express.static.mime.define({
'application/vnd.unity': ['unity3d'],
});