Skip to content
Snippets Groups Projects
Commit e78ab2e2 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

update import of moke data

parent c6a28c10
No related branches found
No related tags found
No related merge requests found
Pipeline #10849 passed
......@@ -142,12 +142,7 @@ First install ACH using yarn :
yarn global add cozy-ach
```
Next launch the script **createDayDataFiles.js** available into **scripts** folder
```
cd scripts
node createDayDataFiles.js
```
Next create the "config.js" file base on the "config.template.js"
!!! info ""
You can change the period of data generated by changing the following lines:
......@@ -163,6 +158,13 @@ You can change the period of data generated by changing the following lines:
Just replace -120 by the value needed
Next launch the script **createDayDataFiles.js** available into **scripts** folder
```
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:
......@@ -186,11 +188,12 @@ Your dev stack should be running to import data needed to simulate konnectors co
When using local environment, konnectors are not able to connect.
To simulate the connection you can use the script **createConnection.js** available in **scripts** folder.
First update the Bearer and cozysessid information from the script:
First update the authorization and cookie information from the "config.js" file (if not create just create it from the "config.template.js" file):
```
Authorization:
'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
Cookie: 'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
const authorization =
'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
const cookie =
'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
```
To obtain your own Bearer and cozysessid you need to have the application launched and display the web console (F12) in your navigator and select the Network tab. Just select one request and retrieve information for Request Header:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment