# ows-assets-migration

This microservice is responsible to migrate assets from AVL to S3.

## Installing

- Install Node.js 6.11 or a later LTS version. It's recommended to use [nvm](https://github.com/creationix/nvm).
- Install [yarn](https://yarnpkg.com/lang/en/)
- Run `yarn` to install the dependencies

## Running

- `yarn start`: Start the app with [nodemon](https://github.com/remy/nodemon)
- `yarn lint`: Run the linter with [standard](https://standardjs.com/)
- `yarn test`: Run the tests with [jest](https://facebook.github.io/jest/)

## Updating

- `yarn add <package_name>`: Add a dependency
- `yarn add -D <package_name>`: Add a development dependency
- You can update the `standard` block in `package.json` to configure the linter
- You can update the `jest` block in `package.json` to configure the test runner

## Notes

- [winston](https://github.com/winstonjs/winston) is used for logging
- On QA and Prod environments, the AWS credentials are taken from the IAM role associated with the EC2 instances hosting the microservice, as described here: [http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-iam.html](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-iam.html)
- On dev environments, the AWS credentials are taken from the shared credentials file, as described here: [http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html)
