cancel
Showing results for 
Search instead for 
Did you mean: 

Neo4j desktop - where to place browser guide file

Amr_Rahmy
Node Link

I am using neo4j desktop on windows and the database is 4.2.3.

I wanted to add a browser guide, the help/wizard carousel.

I don't know where the root for localhost:7474 is created, or how to make for example ":play guide" point to the the browser guide i made.

on the desktop browser, i have the option to add a file, which places a file inside
C:\Users<user>.Neo4jDesktop\projects<projectname> but it was using a different port 11001 i if i remember correctly.

using a url on localhost using http or https with a different port causes cors missing allow header, which i think is from the client request, as i have it enabled on the server side, so the neo4j browser requests is the one missing the allow cors.

I want to know where to place a file so i can for example do
http://localhost:7474/browser?cmd=play&arg=http://localhost:7474/guide.html or
:play http://localhost:7474/guide.html

edit:
I added these two to the response header, and now it's working accepting html from a different server application on a different port number,

"Access-Control-Allow-Origin",""
"Access-Control-Allow-Headers","
"

in undertow,

exchange.getResponseHeaders().put(new HttpString("Access-Control-Allow-Origin"), "");
exchange.getResponseHeaders().put(new HttpString("Access-Control-Allow-Headers"), "
");

I still don't know the root folder for the 7474 web application. I think it might be a nodejs application, but i even tried searching for one of the gifs in one of the guides "Keystrokes2.gif". The one used in 7474 is not from the installed data. the one from the neo4j desktop builtin browser is there. It's not in the installation directory C:\Program Files\Neo4j Desktop
so it might be in a weird windows folder. I installed neo4j desktop for all users, maybe there is a folder for temp data files, like C:\ProgramData or some other place

1 ACCEPTED SOLUTION

I got it working on the browser side 7474 by adding these
"Access-Control-Allow-Origin",""
"Access-Control-Allow-Headers","
"
to an embedded web application i created in java.

Apparently the headers one works when the http method is OPTIONS or something like that.

The add guide or ... I have only seen in the neo4j desktop client application, which works for the neo4j dektop browser, but apparently that uses a different port, so it's a different web application. the localhost:7474 web application, not sure where I should put the file but it's at least working for me for now. Maybe the neo4j server will be better in that aspect, I have only used the desktop version on windows so far.

View solution in original post

3 REPLIES 3

abk
Neo4j
Neo4j

Hi @Amr.Rahmy ,

The flow here isn't quite smooth, yet.

The easiest thing to do is:

  • add the guide to a project (I usually drag&drop a file right onto the project name in the sidebar)
  • click on the ... menu to select "Copy url to clipboard"
  • that URL can be pasted into the :play command

Best,
ABK

I got it working on the browser side 7474 by adding these
"Access-Control-Allow-Origin",""
"Access-Control-Allow-Headers","
"
to an embedded web application i created in java.

Apparently the headers one works when the http method is OPTIONS or something like that.

The add guide or ... I have only seen in the neo4j desktop client application, which works for the neo4j dektop browser, but apparently that uses a different port, so it's a different web application. the localhost:7474 web application, not sure where I should put the file but it's at least working for me for now. Maybe the neo4j server will be better in that aspect, I have only used the desktop version on windows so far.

Oh, I see. You're trying to set up a Neo4j DBMS with shared content for a broader audience, is that right?

You're right, the Neo4j Desktop is basically a web-server that hosts front-end apps like Neo4j Browser (and also content within a project).

The Neo4j DBMS has a small http server for hosting Neo4j Browser, but isn't available as a general purpose web server -- it doesn't host arbitrary static content. Most of the guides are either baked-in to Neo4j Browser, or hosted on guides.neo4j.com.

To create and host your own guides that other people can use, take a look here Tutorial: Create a Custom Browser Guide - Developer Guides

Best,
ABK