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

ecolyo: review lauch_local_application

parent f32d7a56
No related branches found
No related tags found
No related merge requests found
Pipeline #9974 passed
......@@ -110,7 +110,8 @@ yarn winstack
```
A Powershell window will open. Wait until the success message:
**TO BE COMPLETED**
> Everything is setup. Go to http://ecolyo.cozy.tools:8080/
> To exit, press ^C
Once successfull you can launch your local cozy with following url: [Cozy local url](http://cozy.tools:8080/)
Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/)
......@@ -124,7 +125,8 @@ yarn linuxstack
```
Wait until the success message:
**TO BE COMPLETED**
> Everything is setup. Go to http://ecolyo.cozy.tools:8080/
> To exit, press ^C
Once successfull you can launch your local cozy with following url [Cozy local url](http://cozy.tools:8080/) and connect with the password '**cozy**'.
Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/)
......@@ -140,10 +142,10 @@ First install ACH using yarn :
yarn global add cozy-ach
```
Next launch the script **createDayDataFiles.js** available into **test** folder
Next launch the script **createDayDataFiles.js** available into **scripts** folder
```
cd test
cd scripts
node createDayDataFiles.js
```
......@@ -161,11 +163,11 @@ You can change the period of data generated by changing the following lines:
Just replace -120 by the value needed
Json files with data will be created into **test/data** folder.
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:
```
cd test
cd scripts
./importData.bat
```
......@@ -174,4 +176,28 @@ You'll be prompted for a cozysessid, you can get it in the web console ; in the
A new browser windows will open and asking you approval to import data. Just click on **Approve**
Finally your data is loaded and ready to be displayed in the Ecolyo Application !
Finally your data is loaded in the Ecolyo Application !
## Simulate konnector connection
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:
```
Authorization:
'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
Cookie: 'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
```
To obtain your own Bearer and cozysessid you need to have the application launched and display the DevTools (F12) in your navigator and select the Network tab. Just select one request and retrieve information for Request Header:
![Bearer&cozysessid](bearer_cozyssesid.png)
Next launch the script :
```
cd scripts
node createConnection.js
```
Your data is now loaded and you can refresh the application to see your konnector connected.
\ No newline at end of file
docs/img/bearer_cozysessid.png

165 KiB

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