Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.