Hi tamuri,
the webpack development server setup is at the moment not-functional and unused.
Bad news aside, you can still set things up for local development/debug, just without webpack dev server. From what you say you seem to already have the first part in place, a locally running OMERO server and web instance.
What you do first is to clone/fork the repo to be able to build the bundle.
Make sure the following components/directories are in your system's PYTHONPATH:
1. iviewer_project_root/plugin, e.g: /opt/workspace/omero-iviewer/plugin
2. omero marshal, e.g: /opt/workspace/omero-marshal
Omero Marshal you can also get/clone/fork from git (
https://github.com/openmicroscopy/omero-marshal) or from here:
https://pypi.python.org/pypi/omero-marshal/0.5.1then you export them like this (replacing with the actual directories!)
- Code: Select all
export PYTHONPATH=$PYTHONPATH:/opt/workspace/omero-marshal:/opt/workspace/omero-iviewer/plugin
This is something that's helpful if it is done in a "persistent" way, i.e. exported in a place such that all shell sessions will have the PYTHONPATH up-to-date. It's difficult to give you a directive here because it depends on what your operating system is offering. I run linux and have my own development user and use that user's .bashrc file for exports. Another alternative is perhaps an /etc/profile.d file (for all users) or maybe you'd rather run a script pr export manually.
To make iviewer available as an installed app on your local OMERO server you have to run:
- Code: Select all
OMERO_SERVER/bin/omero config append omero.web.apps '"omero_iviewer"'
You can find the omero config commands for making iviewer the default viewer or adding it as an open with option here:
https://github.com/ome/omero-iviewer/tree/master/plugin/omero_iviewerFor your webserver configuration the following guide will describe the options available to you:
https://docs.openmicroscopy.org/omero/5.4.1/developers/Web/Deployment.html. You could either use the lightweight development server or nginx. I'll leave it up to you which one you want to follow/like best.
Depending on your choice iviewer will be accessible on
127.0.0.1/localhost(:port)/iviewer. Alternatively you could use OMERO.web and open images (if open with has been configured/iviewer is default viewer). You can debug iviewer using your browser's dev tools.
There are 2 ways to build iviewer, the production version which is minified and not really debuggable and the debug version. So you can either run
- Code: Select all
npm run prod
or
- Code: Select all
npm run debug
So that's quite a bit of information to digest, the good news is that once you have a local setup, you only need to build. Let me know if there are any steps that are unclear or if you are getting any errors on the way and we can see what we are missing.
Just in case, you might also find some information useful about developing web apps using OMERO/django in general, including OMERO.figure and iviewer:
https://downloads.openmicroscopy.org/presentations/2017/Team-Training/OMERO-apps/#/.
The respective presentation for the slides can be found here:
https://zoom.us/recording/play/GeKrK8sDd27OkuEN6YmQ5RKdtpnP_0zY08cpn3xqj2M-tSfcZwDI-4afST8tTZ6j:
And last but not least here are code examples using different java script frameworks:
https://github.com/ome/omero-web-apps-examples