|
1 | 1 | # hooks-svn-arangodb
|
2 | 2 | ArangoDB Foxx Service and node.js bot to sync SVN revision logs into ArangoDB
|
| 3 | + |
| 4 | +This instrumentary has the following tools |
| 5 | + |
| 6 | +- CLI utility written as Node.js made bot that you can execute on time intervals or as a post commit hook for Visual SVN Server or whatver else you might be using. |
| 7 | + |
| 8 | +- Foxx service that runs inside ArangoDB |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +>### ArangoDB Foxx |
| 13 | +>https://www.arangodb.com/why-arangodb/foxx/ |
| 14 | +>Foxx is a JavaScript framework for writing data-centric HTTP microservices that run directly inside of ArangoDB. |
| 15 | +
|
| 16 | +--- |
| 17 | + |
| 18 | +## Running whole thing |
| 19 | + |
| 20 | +### Preparing ArangoDB |
| 21 | + |
| 22 | +Once you downloaded _hooks_svn_arangodb_ you will need just few more steps |
| 23 | + |
| 24 | +- Make sure tht your ArangoDB is up and runnign and accessible from the machine where you install your service |
| 25 | +- Run _foxx install_ on _foxx-service_ folder that comes from this repo |
| 26 | + |
| 27 | +Once service is installed to the endpoint you specified, you can test it by going on _http://your_arangodb_server/.../your_endpoint/hooks-svn/_ and it should bring you response like the following: |
| 28 | + |
| 29 | +```json |
| 30 | +{ |
| 31 | + "result": "ok" |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +Here we go, you've got running. |
| 36 | + |
| 37 | +You might want to put your Foxx service behind some proxy with different authentication rules and so on, like in some of my cases, I put my foxx services behind /api virtual folder on my web apps or even giving _api_ subdoman to them. |
| 38 | + |
| 39 | +### Setting up the bot |
| 40 | + |
| 41 | +Now we need to setup the bot itself, which is pretty straight forward CLI writtend in Node.js that using unirest, commander and node-svn-ultimate modules. |
| 42 | + |
| 43 | +- Inside of . _svn-bot_ folder run |
| 44 | + |
| 45 | +```sh |
| 46 | +yarn |
| 47 | +``` |
| 48 | + |
| 49 | +Once dependencies are installed you can run _yarn start_ |
| 50 | + |
| 51 | +```sh |
| 52 | +yarn start --help |
| 53 | +``` |
| 54 | + |
| 55 | +### CLI options |
| 56 | + |
| 57 | +``` |
| 58 | + -a, --address [svn address] address |
| 59 | + -u, --username [username] username |
| 60 | + -p, --password [password] password |
| 61 | + -d, --destination [destination] API destination where data will be sent |
| 62 | + -h, --help output usage information |
| 63 | +``` |
| 64 | + |
| 65 | +While _-a, -u, -p_ are all about connecting to your SVN server, _-d_ is the address where your SVN web hook is located |
0 commit comments