Open egarim opened 7 years ago
@egarim: you should target the index.js (lib/ts/index.js in the examples) or the main entry file for your server and should use the correct port by using process.env.PORT
. odata-v4-server examples are using fixed port 3000. Although I don't know how IIS manages the URL after the script name to work with OData URLs.
I will give it a try and give you an update on how it went ,if I make it work I will post another tutorial
From: Viktor Lázár [mailto:notifications@github.com] Sent: Tuesday, August 22, 2017 2:22 PM To: jaystack/odata-v4-server odata-v4-server@noreply.github.com Cc: Jose Ojeda joche.ojeda@bitframeworks.com; Mention mention@noreply.github.com Subject: Re: [jaystack/odata-v4-server] How to run the odata-v4-server on iis (#17)
@egarim https://github.com/egarim : you should target the index.js (lib/ts/index.js in the examples) or the main entry file for your server and should use the correct port by using process.env.PORT. odata-v4-server examples are using fixed port 3000. Although I don't know how IIS manages the URL after the script name to work with OData URLs.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jaystack/odata-v4-server/issues/17#issuecomment-323997104 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACu2pKZh64R3OLPnp0MAtfZjgzaUQ8Lzks5sarnLgaJpZM4O-aLZ . https://github.com/notifications/beacon/ACu2pPzSSwEYGPKhHxNf1YO5NlLdrY8zks5sarnLgaJpZM4O-aLZ.gif
Well so far I have been able to serve really basic files
Check this url
http://tinker.sv/node/node/lib/hello.js
the content of that file is this
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world! [helloworld sample; iisnode version is ' + process.env.IISNODE_VERSION + ', node version is ' + process.version + ']');
}).listen(process.env.PORT);
A really simple node js script
But when I try to run the server as you advised me
http://tinker.sv/node/node/lib/index.js
I got this error
https://www.screencast.com/t/iBK196q4n3P9
I’m going to contact the creator of the iis node module and let you know what he answer
From: Viktor Lázár [mailto:notifications@github.com] Sent: Tuesday, August 22, 2017 2:22 PM To: jaystack/odata-v4-server odata-v4-server@noreply.github.com Cc: Jose Ojeda joche.ojeda@bitframeworks.com; Mention mention@noreply.github.com Subject: Re: [jaystack/odata-v4-server] How to run the odata-v4-server on iis (#17)
@egarim https://github.com/egarim : you should target the index.js (lib/ts/index.js in the examples) or the main entry file for your server and should use the correct port by using process.env.PORT. odata-v4-server examples are using fixed port 3000. Although I don't know how IIS manages the URL after the script name to work with OData URLs.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jaystack/odata-v4-server/issues/17#issuecomment-323997104 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACu2pKZh64R3OLPnp0MAtfZjgzaUQ8Lzks5sarnLgaJpZM4O-aLZ . https://github.com/notifications/beacon/ACu2pPzSSwEYGPKhHxNf1YO5NlLdrY8zks5sarnLgaJpZM4O-aLZ.gif
Hi I have a iis setup that is able to run node js files, for that i used this guide https://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx
after the iis setup is done, basically I just need to point the browser to the url of the js file containing the server like this "http://localhost/node/helloworld/hello.js"
but i the case of the odata server to start it, I use the command npm start. so for me is not clear to which js file should I point to start the saver as I do when I use node in iis