Hi everybody
I'm trying to use stardog.js from browser to execute a sparql query,
however I can't get a connection with server or I don't know if I forgot something
this is the code that I implemented
I only import stardogjs library
<script src="js/stardog.js" type="text/javascript"></script>
<script type="text/javascript">
var conn = new Stardog.Connection();
conn.setEndpoint("
http://localhost:5820/");
conn.setReasoning("QL");
conn.setCredentials("admin", "admin");
conn.query({
database: "prueba",
query: "select distinct ?s where { ?s ?p ?o }",
limit: 10,
offset: 0
},
function (data) {
console.log(data.results.bindings);
});
</script>
this code throws the next exception
![]()
best regards...