Set up your development environment - Phyks/konnectors GitHub Wiki
Introduction
Can't wait to have your data automatically stored in your tools? You're in the right place! We are going to help you writing your own data connector. Before starting to write it, you need a proper development environment that requires the following elements:
- Node.js >= 4.0
- Coffeescript (to run the dev tools)
- cozy-dev (cozy development environment)
- The Konnectors sources
Node.js 4
To install Node.js 4.x, it's recommended to use your distribution package. If that's not the case, you can find it in the download section of the official website: https://nodejs.org/en/download/.
On Linux, if not using your distribution package, the simplest solution is to download the sources and compile them:
wget https://nodejs.org/dist/v4.4.2/node-v4.4.2.tar.gz
tar -xvzf node-v4.4.2.tar.gz
cd node-v4.4.2
./configure
make
sudo make install
To check that Node.js is properly installed, type the following commands:
node -v
npm -v
The output should be node 4.x
and npm 2.x
.
Coffeescript runtime
Coffeescript runtime will allow you to run the dev tools that will help you in making your connector.
For that simply install it with your distribution packages or the following command:
npm install coffee-script -g
Cozy-dev
The easiest way to test and run your konnectors is to use the cozy development environment.
Once you have your development VM up and running, you can proceed. Remember to start again the VM (cozy-dev vm:start
before coming back to work on Konnectors).
Konnectors Source
Now get the Konnectors source (it's recommended that you fork the repo first and clone your fork):
git clone https://github.com/cozy-labs/konnectors
Once you have the sources, install the dependencies:
cd konnectors
npm install
You're now ready to [write your first konnector](Write your first connector)!