Skip to content

Conversation

@rm-rf-etc
Copy link

@rm-rf-etc rm-rf-etc commented Jul 18, 2018

Found and fixed various issues, also moved ENV vars to dotenv, which also works with docker-compose. Added a docker-compose.yml so people don't have to manually configure ArangoDB. Also helps if people want to deploy to Kubernetes.

You can safely use const and let now, no need to use var anymore.

I removed any comments which didn't clarify anything that wasn't already apparent in the code.

BTW, I notice you didn't include a call to db.useBasicAuth(user, pass); I have to assume you are/were running ArangoDB with user auth disabled. This is not recommended, and will trip up some people who are trying out ArangoDB for the first time, by default it's enabled, so Unauthorized errors will come back in the response with no clear indication why.

The way you were forming queries would leave you open to parameter injection. By changing the strings to aql string templates, this is guarded against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant