301 - This repo was moved to the eagletrt organisation.
A local webapp made with VueJs and NodeJs to easily export the telemetry data of @eagleTRT.
This project was made for @eagleTRT. The telemetry data are saved as a MongoDB in a Raspberry inside the car. The purpose of this project is giving a fast way to export the data as json or csv. The project is a NodeJs server running in the raspberry and serving a VueJs webapp. It should be used with desktop devices, in that mobile support was not needed.
Here is a demo with a mock database. The demo was deployed with Heroku and hosts the database on MongoAtlas. Needing the server mongoexport installed in the machine, I had to deploy it using also Docker. Every time something is pushed on GitHub, Heroku builds a new Docker image from the Dockerfile and deploys it.
To see a demo, scroll up to the top of this README.
Usage:
- The user types in a browser
http://IP:PORT
, whereIP
is the ip of the raspberry andPORT
is the port of the server. - The webapp asks the server for the database schema and shows it.
- Three columns are shown. The first shows the databases. When the user select a database, in the second column appear the collections of that database. The user can select or unselect collections by clicking on them. All the selected collections appear in the third column, organized by database. The selected collections can be unselected also by clicking them in the third column.
- Once selected the collections to export, the user clicks the JSON or the CSV button, depending on the desidered format.
- The webapp sends the request to the server and wait for a zipped file of the exported collections.
- After the server answers to the webapp, the zip file named with a human-readable timestamp is downloaded. Then the webapp comes back to point
2
.
To put the exporter in the raspberry:
- Connect the raspberry to the internet.
- Install NodeJs if it is not installed.
- Clone the repository.
- Open the terminal in the root directory of the repository.
- Execute
npm i
. - Execute
npm run start
.
To change the server port or the mongodb uri:
- Open the file
config.json
. - Set the property
PORT
as needed. - Set the property of the object
MONGO
as needed.
To change something in the frontend:
- Open the terminal in the directory
vuejs
of the repository. - Execute
npm i
. - Make changes to the frontend source code.
- See changes by executing
npm run serve
and open a browser inhttp://IP:8080
. Start the server if backend api are needed. - Open the terminal in the root directory of the repository.
- Execute
npm run build:frontend
. - Execute
npm run start
to start the server.
To change the api hostname of the frontend:
- Open the file
vuejs/src/config.json
of this repository. - Change the
host
and theport
properties as needed. - Open the terminal in the root directory of this repository.
- Execute
npm run build:frontend
. - Execute
npm run start
to start the server.
Note: If you can not modify vuejs/src/config.json
, you can pass url parameters to the webapp, such as http://IP:PORT?hostname=localhost:2323
or http://IP:PORT?host=localhost&port=2323
.