Quantcast
Channel: Questions in topic: "nodejs"
Viewing all articles
Browse latest Browse all 130

I have .unity3d web on a Node.js server but the Unity3d app will not load. I believe it is a mime type restriction. Is there a Node.js function or plugin that can set up my mime types?

$
0
0
I cannot play my unity3d game files (mime type="application/vnd.unity") over a Node.js connection. (I am able to play the unity3d through the Apache Vhosts Access.) I just started a new instance of a Node.js app server to begin development of server side game components. I have a basic server.js: var http = require('http'), fs = require('fs'); fs.readFile("./unityBase.html", function (err, html) { if (err) { throw err; } http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/html"}); response.write(html); response.end(); }).listen(8080); }); And a simple unityBase.html: Unity Web Player | StarFluke
(I stripped out a Style block for you to see the code easier.) As I mentioned earlier, the unityBase.html runs fine in Apache Vhost Access; it does not run through a normal browser connection to www.starfluke.com or starfluke.com. It gives an error that claims the unity3d file is corrupt. Do you have any suggestions of what I might try? Anything would be helpful, I am new at Node.js. Oh, when testing the page make sure you have the Unity3D web player installed: (http://unity3d.com/webplayer). I stripped out that part of the page code to try to narrow down the problem. Thank you, Daniel

Viewing all articles
Browse latest Browse all 130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>