Dedicated web server
The Neo4j Browser is a client-side single-page application (SPA), which uses an HTTP server for its static content. It is possible to host a dedicated web server to serve Neo4j Browser as a web application. Download Neo4j Browser from Maven.
Here are some use cases of why this deployment mode could be useful.
- Neo4j Browser local hosted
-
This case is valid if you have access to a Neo4j instance and do not want to install Neo4j Desktop or do not want to use a hosted Neo4j Browser web application. It is a simple solution, start a local hosted Neo4j Browser web application on your machine with a simple one-line command. It is also easy to run a specific version of Neo4j Browser, download the preferred version from Maven.
- Neo4j Browser deployed web application
-
If you want to have specific network configurations within your network and host Neo4j Browser for quick access within your organization, you can host Neo4j Browser with an HTTP web server. This allows for full control of configuring the HTTP web server as needed. For example you way want to add a layer of access control to access the Neo4j Browser web application and configure the HTTP web server connection to use TLS.
- Extend or improve the source code
-
Neo4j Browser is open source (GNU General Public License v3.0), and the source code can be found at https://github.com/neo4j/neo4j-browser. If you want to extend or contribute to the project, you can alter the code. This allows you to run a modified version of Neo4j Browser.
If you have installed Neo4j on your system, then disable the browser module ( |
HTTP web servers
Here is a list of suggestions for simple HTTP web servers that can be used to host Neo4j Browser.
- Python3 —
http.server
-
A simple HTTP server that is bundled with Python 3. Do not use in production environment.
python -m http.server --directory neo4j-browser/ 8080
For more information, see https://docs.python.org/3/library/http.server.html.
- Node.js —
http-server
-
A simple, zero-configuration command-line HTTP server.
npx http-server -p 8080 neo4j-browser/
For more information, see https://www.npmjs.com/package/http-server.
- Node.js —
serve
-
A simple HTTP server is ideal for serving a static site, single page application or just a static file.
npx serve -l 8080 neo4j-browser/
For more information, see https://www.npmjs.com/package/serve.
HTTP servers suitable for production use:
|
Pre-built Neo4j Browser
You can download Neo4j Browser from Maven (https://search.maven.org/artifact/org.neo4j.client/neo4j-browser) and serve the web application with an HTTP server.
-
Download Neo4j Browser from Maven.
wget https://repo1.maven.org/maven2/org/neo4j/client/neo4j-browser/5.13.0/neo4j-browser-5.13.0.jar
Alternatively, manually go to https://search.maven.org/artifact/org.neo4j.client/neo4j-browser and download Neo4j Browser.
-
Unzip the .jar file.
unzip neo4j-browser-5.13.0.jar
-
Host Neo4j Browser with an HTTP server.
Start a web server to serve the content. In this example, you start a web server with Python 3.
python -m http.server --directory browser/ 8080
Point your web browser to http://localhost:8080.
-
Test the connection to a Neo4j database instance.
If you have the Neo4j tarball, you can start the database instance with the command (assuming that the current working directory is <neo4j-home>):
bin/neo4j start
In Neo4j Browser, connect to the Neo4j database instance with the URI:
neo4j://localhost:7687
For details on how to set up a connection to Neo4j in Neo4j Browser, see Connect to a Neo4j DBMS. |
Build Neo4j Browser
You can build the source code and host Neo4j Browser.
The source code can be found at https://github.com/neo4j/neo4j-browser.
-
Get the source code from Github
Clone the Neo4j Browser Git repository. The command gets only the
master
branch to save bandwidth and file space.git clone --single-branch --branch=master https://github.com/neo4j/neo4j-browser/
Change the current working directory to the root of the Git repository.
cd neo4j-browser
-
Build with Node.js.
-
Install Node.js dependencies.
npm install
-
Build the project.
npm build
-
-
Host web application with an HTTP server.
Start a web server to serve the content. In this example you, start a web server with Python 3.
python -m http.server --directory dist/ 8080
Point your web browser to http://localhost:8080.
For details on how to set up a connection to Neo4j in Neo4j Browser, see Connect to a Neo4j DBMS. |