neo4j - 在本地运行 graphgists 失败

标签 neo4j rabbithole

我有兴趣在本地运行 graphgist,这里有一个脚本:

https://gist.github.com/jexp/70296ce410ff431ddbef

我能够安装模块并运行两个任务,但脚本的最后一行:

open http://localhost:8000/?http%3A%2F%2Flocalhost%3A8000%2Fgists%2Fmy-graph-use-case.adoc

产生错误:未找到并尝试打开评论中的链接:

http://localhost:8000/gists/my-graph-use-case.adoc

导致我的浏览器下载一个没有关联应用程序的文件。有人做过这个工作吗?如果是的话,是怎么做的?

最佳答案

根据 @MichaelHunger 的说法,问题在于 Python 的 SimpleHTTPServer 中的默认行为是在 URL 末尾添加尾部斜杠 (/),从而弄乱请求。

根据 @PratikMandrekar 的说法,在下面的文章中,问题是脚本中的 url 没有显式指定文件名,迫使服务器重定向到默认值。请参阅:

Why does SimpleHTTPServer redirect to ?querystring/ when I request ?querystring?

经过一些实验,我发现这是可行的:

http://localhost:8000/index.html?http%3A%2F%2Flocalhost%3A8000%2Fgists%2Fmy-graph-use-case.adoc

请注意,内部 url 中的冒号、斜杠等必须经过编码才能正常工作

关于neo4j - 在本地运行 graphgists 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30874619/

相关文章:

r - 如何在 Neo4j 中使用密码查询将多个值关联到一个属性

cypher - neo4j 密码查询太慢

java - 仅 GraphRepository<> 中的 findAll() 以 org.neo4j.graphdb.TransactionFailureException : Failed to mark transaction as rollback only 结尾

node.js - 使用用于 Nodejs 的 Neo4j-Driver 通过 id 和参数获取 Node

带有参数映射的 neo4j cypher set 语句