A Little Chat App, and Some Testing
Some writing and coding I've done lately
It’s been a while! I’m still around, but it’s been a busy couple of months. Sometimes you just need to take a break to make sure you don’t get burned out. As always, I have endless ideas of what to write but less than endless time. I’m also starting a new job next month! (If you’re a Python developer, give me some tips going from JS to Python :D)
Sometimes I think making a nice, clean project and putting it up on GitHub is a better alternative to writing a tutorial or article.
I have both for you today.
I made a little MVP of a chat app in TypeScript, with a React/Redux front end and a Node/Express backend using Socket.io. I’ve never used sockets before or made a chat app, so it was fun to set this up. Socket.io is also good for notifications in an app, so it can be useful to learn even if you’re not interested in chat.
If I struggle to figure something out, I like to share what I’ve learned with the world for the next person who wants to perform the exact same task. In this case, setting up database setup/teardown and making API calls in tests. In this case, it’s for an Objection ORM-based TypeScript API, but the basic idea would be useful for any Express API. Objection is pretty cool, too! Making integration tests and testing all the success/error responses of the API provides a lot of confidence.
So that’s what I’ve got for the day, have a nice Thursday!