Skip to content

Restructure, clean house, use docker, use dotenv... #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

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