Skip to content
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

Running niiview on a remote system #70

Open
vikashg opened this issue Nov 1, 2024 · 3 comments
Open

Running niiview on a remote system #70

vikashg opened this issue Nov 1, 2024 · 3 comments

Comments

@vikashg
Copy link

vikashg commented Nov 1, 2024

Hi I am interested in running nii view on a remote server. I tried npm run dev -- --host. But my webpage doesnt really load it remains blank.

  VITE v5.3.4  ready in 247 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: http://x.x.x.x:5173/
  ➜  Network: http://x.x.x.x:5173/
  ➜  Network: http://x.x.x.x:5173/
  ➜  press h + enter to show help

Removed the IP with x.x.x.x

@korbinian90
Copy link
Collaborator

The web app always runs in the browser, it doesn't have a server backend.

Vite is only used for development, so it's think the webpage it hosts might be only accessible from the same local network. But this is the same as https://niivue.github.io/niivue-vscode/. This is a web app version, it runs in the browser and has no remote support. Vite compiles the typescript code to Javascript, the code still runs in your local web browser. You wouldn't be able to access files on the remote machine, only local files (on the machine that opened the page in the browser) or links to online hosted images.

For viewing images on a remote machine, I use vscode to connect to the remote machine and install the niivue extension in the remote vscode window.

What is your goal?

@vikashg
Copy link
Author

vikashg commented Nov 2, 2024

I do not know a lot about node js or vite. I will read about this. However if i may explain. Is it possible to run niiview such that i start it while exposing the host and i can access it on a different computer by going to the url http://x.x.x.x:5173/index.html

My goal is to host niiview on an EC2 instance and then access it using the ip address of the EC2 instance

@korbinian90
Copy link
Collaborator

Currently it is not possible to host Niivue, since it doesn't have a backend, it runs purely in the browser of the local machine.

But you can use the vscode solution:

  1. use vscode to connect to the remote machine
  2. install the Niivue vscode extension in the remote session
  3. open image files in the vscode file browser to render them with Niivue
    vscode handles all the complicated remote connection things, no custom server is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants