-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: http server simulation? #39
Comments
I don't understand your question, isn't node.js designed for http server? Why simulation? |
I probably had blocked with the same issue, the current available demos does not help newbie with limit node.js knowledge. The demo package.json load html pages with file:// prefix. It will be better to provide a simple demo that shows how to configure to run web pages with http server in node-webkit. the demo should answer those questions
|
Do you mean something like this? <html>
<body>
<script>
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('hello');
}).listen(10086);
</script>
</body>
</html> |
Most node.js doc says use command $ node [filename].js to run the node.js script. what is the correspondent way to trigger a node.js script/application in node-webkit? I can't get any visual result with above code on mac os 10.7. thanks |
Maybe you have misunderstood node-webkit's purpose. node-webkit is not used to execute node.js scripts, but to show HTML pages which contains node.js code. It's strange to run a http server in node-webkit. |
we'll support run unwrapped node.js code directly, which I think is useful. see issue #36 |
Uhm, sorry the ambigous question... Thanks |
@fatshotty , the similar thing should be possible after we fix #36. |
I'm still not very sure about what you want. To send request and replace part of the web page, you can use To just show a URL, specify the URL in the To use the traditional node.js way of showing web pages, e.g. use template engines like Jade, HMAL, just use them, you don't need to emulate http request. Or do you mean HTML5 history API? Which show different contents according to current URL. I think you just go the wrong of writing apps, a HTML app can need nothing of node.js stuff. |
And it's wrong to use the appjs way to write HTML apps, if you do, you'll lose the chance of moving your apps to other platforms forever. |
understood, clear ;) thanks everybody |
is it possibile to have an http server simulation?
thanks
The text was updated successfully, but these errors were encountered: