Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romykundal/api-fetch-weather-data
nodejs project task including integrated third party API to get weather data from Weather API, also Unit test case implemented in mocha chai module
https://github.com/romykundal/api-fetch-weather-data
api babel-cli chai dotenv mocha mongo mongoose nodejs restful supertest supertest-mocha-chai testing unit unittest weather
Last synced: about 1 month ago
JSON representation
nodejs project task including integrated third party API to get weather data from Weather API, also Unit test case implemented in mocha chai module
- Host: GitHub
- URL: https://github.com/romykundal/api-fetch-weather-data
- Owner: romykundal
- License: mit
- Created: 2024-01-11T14:56:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T19:57:44.000Z (about 1 year ago)
- Last Synced: 2024-11-06T13:56:18.788Z (3 months ago)
- Topics: api, babel-cli, chai, dotenv, mocha, mongo, mongoose, nodejs, restful, supertest, supertest-mocha-chai, testing, unit, unittest, weather
- Language: JavaScript
- Homepage: localhost:3600
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nodejs Appplication RESTfull API with Unit test cases in weather check app
Create a simple Node.js application that fetches data from a public API (e.g., OpenWeatherMap) and displays relevant information on a basic web page. Use asynchronous programming techniques and ensure the code is well-organized and follows best practices....# Project Name
## Getting Started
Ensure you have a stable Node.js version installed (e.g., Node.js 18).
### Installation
Run the following command to install the project dependencies:
1. Install dependencies:
```bash
npm install# Configuration
Create a .env file in the root directory of your project and configure the required environment variables:
OPENWEATHERMAP_API_KEY=''
MONGO_UI=''Replace the empty strings with your corresponding API keys and configurations.
# Start the Application
To start the application, run the following command:npm start
## Unit Test Example
In this example, we'll demonstrate a simple unit test for a JavaScript function using Mocha and Chai.
### Running Tests
To run the unit tests, follow these steps:
npm run test
License
This project is licensed under the MIT License.