Hi there!
I have a problem with Bolt.Sips and Phoenix. I configured my phoenix app for Bolt as explained in the github page of Bolt.sips but I have the following error while invoking Bolt.Sips.conn : (MatchError) no match of right hand side value: []
It’s like the config file is not taken into account. I don’t understand what’s happening. If someone can help me, it would be fantastic!
Here is my mix.ex file :
def application do
[mod: {ElmDbz, []},
applications: [:phoenix, :phoenix_html, :bolt_sips, :cowboy, :logger, :gettext]]
end
defp deps do
[{:phoenix, "~> 1.1.6"},
{:phoenix_html, "~> 2.4"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.9"},
{:cowboy, "~> 1.0"},
{:bolt_sips, "~>0.1"},
{:boltex, github: "florinpatrascu/boltex"}]
end
And the config.ex file :
config :bolt_sips, Bolt,
hostname: 'localhost',
basic_auth: [username: "neo4j", password: "***"]
And the controller :
defmodule ElmDbz.CharacterController do
use ElmDbz.Web, :controller
alias Bolt.Sips, as: Bolt
def index(conn, _params) do
cypher = """
MATCH (p:Person) RETURN p as character
"""
data = Bolt.query!(Bolt.conn, cypher)
render(conn, "index.json", characters: data)
end
end