Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


6,326 Points

building an API with express node.js

I have to build an API for weather application using express node.js. since I am not saving any data, I am not using the database. my application allows the user to enter a city name, and the weather information will retrieve directly from the openweathermap.org

the question is, I have a working javascript application, but how to GET the weather data from openweathermap.org in the API route city/:cityName

1 Answer

18,813 Points

It's difficult to answer your question with specifics without seeing where you're at in your code. The documentation of the API section you're looking for is probably on this page. Note that you'll need an API key to use their API.

If that doesn't get you on the right track, please post your code here as a workspace snapshot. You could also use a similar service such as codepen if you're more comfortable with that.