diff --git a/docs/ecolyo/Technical/0-getting-started.md b/docs/ecolyo/Technical/0-getting-started.md index 61d6a0a20d5c0f5b8e050379aa806265cc165f57..eb3ac38fa82e9d214344e6afabbae38ddc7cb2f3 100644 --- a/docs/ecolyo/Technical/0-getting-started.md +++ b/docs/ecolyo/Technical/0-getting-started.md @@ -58,12 +58,23 @@ Local database can also be consulted at the following url: [Cozy local DB](http: Your dev stack should be running to import the mock data ::: +:::info ACH + First install ACH using yarn : ```sh yarn global add cozy-ach ``` +:::note +If you cannot execute `ACH` after this command, it may be because you do not have the directory where yarn stores its symbolic links in your `PATH`. Edit it to append the result of `yarn global bin` by executing the following command: + +```sh + export PATH="$PATH:`yarn global bin`" +``` + +::: + Next create the "config.js" file based on the "config.template.js" :::info You can change the period of data generated by changing the following lines: @@ -81,40 +92,28 @@ const endingDate = DateTime.local() Just replace -120 by the value needed ::: -Next launch the script `createDayDataFiles.js` available into the `scripts` folder -```sh -cd scripts -node createDayDataFiles.js -``` - -Json files with data will be created into `scripts/data` folder. -ACH script `importData.bat` will load the content of the file into your CouchDB (database of your dev stack). Launch it using following commands: - -On Windows: +Next run the command ```sh -cd scripts -./importData.bat +yarn data:seed ``` -On Linux: +This script will run two others scripts : -```sh -cd scripts -./importData.sh -``` +1. `yarn data:create` running `createDayDataFiles.ts`. Json files with data will be created into `scripts/data` folder. +2. `yarn data:import` running `importData.sh`. ACH will load the content of the file into your CouchDB (database of your dev stack). Launch it using following commands: -:::note -If you cannot execute `ACH` after this command, it may be because you do not have the directory where yarn stores its symbolic links in your `PATH`. Edit it to append the result of `yarn global bin` by executing the following command: +:::note On Windows: ```sh - export PATH="$PATH:`yarn global bin`" +cd scripts +./importData.bat ``` ::: -You'll be prompted for a **cozysessid**, you can get it in the web console : in the `application` tab, look for the cookies and just copy the cozysessid value. +<!-- You'll be prompted for a **cozysessid**, you can get it in the web console : in the `application` tab, look for the cookies and just copy the cozysessid value. --> A new browser windows will open and asking you approval to import data. Just click on **Approve** @@ -127,9 +126,8 @@ Your dev stack should be running to import data needed to simulate konnectors co ::: When using local environment, konnectors are not able to connect as in production. -To simulate the connection you can use the script **createConnection.js** available in **scripts** folder. -First update the authorization and cookie information from the "config.js" file (if not created just create it from the "config.template.js" file): +First update the authorization and cookie information from the `config.js` file (if not created just create it from the `config.template.js` file): ```js const authorization = 'Bearer xxxxxxxxxxx'; @@ -140,10 +138,10 @@ To obtain your own Bearer and cozysessid you need to have the application launch  -Next launch the script : +To simulate the connection you can use the following script which will run `createConnection.ts`. ```sh -node scripts/createConnections.js +yarn data:connections ``` Your data is now loaded and you can refresh the application to see your konnector connected.