Cli-Mate is a carbon-emissions tracking app. Users can create profiles to view their to-date carbon savings and calculate their daily savings based on distance walked, bussed, or biked.
npm install
npm run serve
First, run:
npm run build
Next, copy the files within the build folder:
- CSS
- JS
- favicon.ico
- index.html
Paste them in the folder /app/views. To run Express / Vue Production Server, see below.
npm run lint
node app.js
npm run test
-
'api/routes/todoRoutes.js' creates get and post requests at /logins endpoint
-
'api/controllers/todoController.js' contains list, create, update, and delete functions
-
'api/models/todoModel.js' contains the schema for a login, user/password/email
-
'config/db.js' contains the connection to MongoDB Atlas through Mongoose (connection url stored in ./keys)
-
When calls are made to the RESTful API, updates and changes are reflected accordingly to MongoDB Atlas because we have connected.
MongoDB Atlas log-in E-mail:
cli.mate.mongodb@gmail.com
To use, navigate to the following link:
https://maps.googleapis.com/maps/api/distancematrix/json?destinations=New%20York%20City%2C%20NY&origins=Washington%2C%20DC&key=AIzaSyDbNa6oUwctkBvSKZixHrtW_IE3zrABBJA
While integration is not completed with the front-end, the matrix calculation is functional on the backend and can be used to calculate distance between two points if hard-coded. The above link is a reflection of our current hard-coded value, which can be translated to a Carbon Performance Index (CPI) value if we connected it to user-input.