NorthernNerds.Aspire.Hosting.Neo4j
3.1.0
dotnet add package NorthernNerds.Aspire.Hosting.Neo4j --version 3.1.0
NuGet\Install-Package NorthernNerds.Aspire.Hosting.Neo4j -Version 3.1.0
<PackageReference Include="NorthernNerds.Aspire.Hosting.Neo4j" Version="3.1.0" />
<PackageVersion Include="NorthernNerds.Aspire.Hosting.Neo4j" Version="3.1.0" />
<PackageReference Include="NorthernNerds.Aspire.Hosting.Neo4j" />
paket add NorthernNerds.Aspire.Hosting.Neo4j --version 3.1.0
#r "nuget: NorthernNerds.Aspire.Hosting.Neo4j, 3.1.0"
#:package NorthernNerds.Aspire.Hosting.Neo4j@3.1.0
#addin nuget:?package=NorthernNerds.Aspire.Hosting.Neo4j&version=3.1.0
#tool nuget:?package=NorthernNerds.Aspire.Hosting.Neo4j&version=3.1.0
NorthernNerds.Aspire.Hosting.Neo4j
NorthernNerds.Aspire.Hosting.Neo4j is an unofficial Aspire hosting integration for Neo4j. This package provides the infrastructure components needed to run Neo4j in your Aspire projects.
Features
- Add Neo4j as a container resource in your Aspire AppHost
- Configure Neo4j connection settings through Aspire parameters
- Built-in HTTP health check so
WaitFor(...)waits for Neo4j to be ready - Data persistence via
WithDataVolume/WithDataBindMount - Automatic container management and configuration
Release notes
3.1.0 (since v3.0.0)
- Updated to .NET Aspire 13.4
- Added an HTTP health check on the Neo4j endpoint so
WaitFor(...)waits for real readiness - Added
WithDataVolumeandWithDataBindMountfor data persistence (mounts/data) - Added argument guard clauses to
AddNeo4j - Bumped the Neo4j container image to the 5.26 LTS
- Thanks to @joshmakestuff for this contribution! (#7)
3.0.0 (since v2.0.0)
- Upgraded to .NET 10 and .NET Aspire 13.1
- Enhanced
AddNeo4jhosting integration ([ResourceName], nullable ports, improvedNEO4J_AUTHhandling, endpoint refactor) - Example updated to wait for Neo4j readiness
Getting Started
Installation
dotnet add package NorthernNerds.Aspire.Hosting.Neo4j
Usage
In your AppHost project:
using NorthernNerds.Aspire.Hosting.Neo4j;
var builder = DistributedApplication.CreateBuilder(args);
var neo4jPass = builder.AddParameter("neo4j-pass", secret: true);
var neo4jUser = builder.AddParameter("neo4j-user", secret: true);
var neo4jDb = builder.AddNeo4j("graph-db", neo4jUser, neo4jPass)
.WithDataVolume(); // persist the graph across restarts
builder.AddProject<Projects.MyApi>("api")
.WithReference(neo4jDb)
.WaitFor(neo4jDb); // gated on the built-in Neo4j health check
AddNeo4jregisters an HTTP health check against the Neo4j endpoint, soWaitFor(neo4jDb)blocks dependents until Neo4j is actually accepting connections. UseWithDataBindMount("./data")instead ofWithDataVolume()to persist to a host directory.
Configure parameters in appsettings.json:
{
"Parameters": {
"neo4j-pass": "Password",
"neo4j-user": "neo4j"
}
}
About Northern Nerds
Northern Nerds is a one-man freelance software company dedicated to creating high-quality software solutions. For more integrations and tools, follow our work!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aspire.Hosting (>= 13.4.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.0 | 186 | 7/19/2026 |
| 3.0.0 | 533 | 1/2/2026 |
| 2.0.0 | 2,777 | 11/17/2024 |
| 2.0.0-alpha | 170 | 11/17/2024 |
3.1.0 (since v3.0.0)
- Updated to .NET Aspire 13.4
- Added an HTTP health check on the Neo4j endpoint so WaitFor(...) waits for real readiness
- Added WithDataVolume and WithDataBindMount for data persistence (mounts /data)
- Added argument guard clauses to AddNeo4j
- Bumped the Neo4j container image to the 5.26 LTS
- Thanks to @joshmakestuff for this contribution! (#7)
3.0.0 (since v2.0.0)
- Upgraded to .NET 10 and .NET Aspire 13.1
- Enhanced AddNeo4j hosting integration ([ResourceName], nullable ports, improved NEO4J_AUTH handling, endpoint refactor)
- Example updated to wait for Neo4j readiness