Skip to content

Lidya-w2-Node.js #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lidyaT21
Copy link

  • Added OpenWeatherMap API integration
  • Created sources/keys.js to store API key
  • Implemented fetch() request inside the POST route
  • Returns city name & temperature if found, otherwise sends error message
  • Installed Jest & Supertest as dev dependencies
  • Added test script in package.json
  • Created tests/app.test.js with a basic test
  • Configured Babel with babel-jest & @babel/preset-env
  • Add API test cases for city validation & responses

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exposing api key is a security risk. You should consider using dotenv module and store api keys in .env file in the root directory of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants