This repository contains a webpage based in nodeJS, wich allows the user to introduce 3 city names and compare some related data, namely, the current weather, sunrise time and sunset time. This was my first nodeJS application and all the data is requested from https://openweathermap.org/, by means of an internal API. The view engine used is EJS.
Fig. 1 - Preview of the WEB app
- Express - mostly for routing;
- body-barser - for parsing JSON requests;
- winston - to make a log record of the requests;
- async - to make multiple assynchronous requests;
- Charts.js - to make the bar chart;
- Bootstrap - To improve the views and make them more fancy;
- In order to make the table sortable, i used a library that you can find here.
- Clone the repository to your machine;
- Open comand prompt and navigate to the folder;
- Type "node server.js" and press enter;
- The app will listen on Port 3000 (make sure you have it avaliable);
- Open browser and go to "localhost:3000";
- Type the 3 cities you want and submit the request.