Forking Predefined Repository
When you are starting an Apination connector development, you should be provided with a read access to a connector repository on bitbucket. Make a private fork to your account and continue development there. When done with initial development or with patching, submit a pull request to the Apination bitbucket account.
Starting from Scratch
If you are starting connector development w\o having a predefined connector repository, you can use a connector project template:
Node.js
git clone git@bitbucket.org:apination/cn-example-lambda.git
cd cn-example-lambda
git remote remove origin
git remote add origin git@bitbucket.org:__YOUR_ACCOUNT__/__YOUR_PROJECT_NAME__.git
git push -u origin --all
git push origin --tags
Project Structure (Node.js)
cn-example-lambda has the following structure:
- .vscode - vscode debug, task and project settings
- scripts - deployment bash scripts (see Deploying Updates for details)
- src
- helpers
- description.json - connector description template (see Connector Description for details)
- index.js - lambda function handler exports
- tests
- integration - tests for integration with 3rd party API
- unit - unit tests that can be run in offline mode (will be run on buildserver)
- index.js
- package.json - project name, repo, version and script definitions (test, release, build and deploy)