Skip to content

Latest commit

 

History

History
47 lines (25 loc) · 1.15 KB

README.md

File metadata and controls

47 lines (25 loc) · 1.15 KB

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:

    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.