Closed qaler closed 5 years ago
For now, I am modifying the ./platform/viewer/.webpack/all.dev.js file. Not sure if it is allowed since this folder is hidden, but it works as the ohif server is started by wds.
Modifying that config, passing the ip/port as a CLI option for the NPM script, or modifying the root webpack common config are probably all equally fine options.
I wouldn't think of anything as hidden. Anything is fair game for reviewing and change. Tooling is grouped and fine to play with. Source code can also be modified, but if you stray from established extension points you may have more difficulty maintaining a fork.
Many thanks! I'll do my search based on your post.
Hi @qaler, were you able to figure this out? Should a new environment variable be added in any of the js files within .webpack? Appreciate any help on this. Also I wasn't sure what needs to be modified in all.dev.js file as none of them seem to be pointing towards a URL path
Hi @qaler, were you able to figure this out? Should a new environment variable be added in any of the js files within .webpack? Appreciate any help on this. Also I wasn't sure what needs to be modified in all.dev.js file as none of them seem to be pointing towards a URL path
Okay got it. added 'host' in /platform/.webpack/all.dev.js: devServer: { host: 'ip address', }
@vnarepalepu, quick note, you should not be using the Webpack Development Server to host your production instance. The only good reason to modify this configuration is to TEST on other devices that have access to the same local network (ie. Phones, tablets, other desktops).
Thank You for getting back @dannyrb. I'v chekced
- Viewers/.webpack/webpackcommonjs.js
- Viewers/platform/viewer/.webpack/webpackcommonjs.js
but didn't seem to understand how and where to provide the port/host as it was in all.dev.js for the namespace devServer { }. Should it be something like prodServer{ } in one of the files above?
Thanks for the great open source image viewer. Just hanging on there to figure out how it would be feasible for our requirements within MGH (Mass Gen Hospital)
@vnarepalepu, quick note, you should not be using the Webpack Development Server to host your production instance. The only good reason to modify this configuration is to TEST on other devices that have access to the same local network (ie. Phones, tablets, other desktops).
I think there may be some confusion. The source code for the OHIF Viewer can be used to generate a collection of static assets (HTML, CSS, JS). You should host these on a Web Server fit for production. Popular ones include:
nginx
, apache
, iis
, tomcat
We provide no server side solution for production. The WebPack Dev Server
is simply a convenience to make it easier to develop and test the application locally.
If you're having trouble evaluating the OHIF Viewer or planning how it should be deployed in a production environment, you may wish to reach out to a consultant.
Alright Thanks @dannyrb. I am using apache webserver and have a website hosted on it through ports 80 & 443. And was looking to click on the data links from the website to open locally stored dicom files in a folder using OHIF viewer. Okay, so now I assume I'll have to host OHIF viewer on apache with a different port so that I can use it for production. Thanks I'll go through the docs again and will reach out to any consultant as necessary. Appreciate for the help
Hello Ohif devs, thanks for the great open source image viewer project. By default, ohif listens on the http://localhost:3000, how could I change (or bind) to 0.0.0.0:MY_PORT ? Thanks in advance!