This frontend app will allow the user to download CSV file with data from the air quality's InfluxDB database. We are using here a MeanJS boilerplate. MEAN is the acronym of MongoDB, Express, AngularJS and NodeJS and it is a strong starting point for apps which use this base.
Don't really use in the app the main client part in the app is in the core module.
Set the main server controller functions to create, delete and find the different CSV files.
Set the permissions in the app for different users, every users are allowed to use all the features.
Set the route of the controller functions.
The files that contains the code for the different services.
- apolline-delete.server.service.js : the service which allows the users to delete the choosen compressed CSV file.
- apolline-exist.server.service.js : the service which allows the users to check if the choosen compressed CSV file exists.
- apolline-getdata.server.service.js : this service creates the CSV and compress it.
The file write.js send the data and the response to the client.
This directory contains all the files from the frontend (HTML view, angularjs).
The JavaScript file for the main view home.client.view.html .
The JavaScript Worker which is used to communicate with the server to create the compressed CSV file.
To see the explanation of the other files please check: Meanjs Documentation.
Make sure you have installed all of the following prerequisites on your development machine:
- GIT: Download & Install Git
- Node.js: Download & Install Node.js
- MongoDB: Download & Install MongoDB
- Bower (Manage your frontend packages)
Installation of npm:
npm install npm -g
You can install Bower by using the following command but be sure you have installed NodeJS and npm (Node Package Manager):
$ npm install -g bower
$ git clone https://github.com/Apolline-Lille/apolline-frontend.git --config core.autocrlf=input
$ cd apolline-frontend/meanjs
$ docker build -t meanjs .
$ docker-compose up
This final command launch your app and finally you can go to the http://localhost:80/ in your browser to see the application.
####Once the bash show this, you can use the apolline frontend app:
meanjs | MEAN.JS - Development Environment
meanjs |
meanjs | Environment: development
meanjs | Server: http://0.0.0.0:80
meanjs | Database: mongodb://db/mean-dev
meanjs | App version: 0.6.0
meanjs | MEAN.JS version: 0.6.0