A weather API with Node.js, OvernightJS and TypeScript

I am, like many of us, working from home. I leave my house only for basic necessities, like food or emergencies. My time is split between work, my wife, videogames and some side-projects.

While cleaning up my GitHub account I’ve found this little project I made a while ago: a weather API with Node.js, OvernightJS and TypeScript. I was pretty proud of it (it’s 100% TypeScript, there’s automatic documentation, linting and tests), so I said: "Let’s write a post about it".

My goal was to map the OpenWeatherMap API to serve a subset of its data in our app, while learning OvernightJS.

What is OvernightJS?

OvernightJS is a simple library to add TypeScript decorators to Express routes.

The thing I like the most about OvernightJS is its simplicity: it’s not meant to act as an extra layer on top of Express or take you away from the RESTful style of writing back-end web APIs.

Check this tutorial if you want to get started with OvernightJS.

Let’s start

Ok, what will this project do? The app will expose 3 endpoints for 3 specific cities: Stockholm, Madrid and Milan.

Check https://dev.to/napolux/a-weather-api-with-node-js-overnightjs-and-typescript-4md2 for the complete tutorial!

If you want to share a comment or report an issue with this post, please send me an email to napolux@gmail.com

Share on: Twitter, Facebook, Reddit, Hacker News or go back home.