Deployment ultimately became a trivial part of the application despite the effort I put into thinking about the platform I was going to deploy it on. So in my previous article, I thought about deploying it as a serverless function and explored that idea. The conversion I spoke about in the previous article was an attempt to prepare the application for that deployment. The reason why I say that deployment became trivial is because I decided to deploy on Heroku. I had done so because I had an application previously deployed on Heroku and I knew enough of the process to make deployment relatively pain free.
The main thing would be compiling the application to JavaScript (for those who don’t remember, this was written in TypeScript) and then deploying the files in the dist folder. The deployment process that I have isn’t very streamlined honestly. I manually copy the dist file over to another folder that handles deployment. If there are any necessary changes that need to be made, I’ll make them (I believe the deployment folder has a different package.json or at least one that’s a bit modified) and then I’ll go through the process of pushing them to a Heroku account. A slight annoyance but I was able to get my app up quickly and ready for review.
I then reached out to my mentor to get my work reviewed. We did it over a Twitter Space and took his time playing around with the application. He had a few critiques here and there but he really loved it for the most part. The thing that he enjoyed the most was the Swagger UI that was added to the application. It wasn’t something that was needed but after working with it at work, I wanted to do something similar for my application as well. This made testing really easy since I haven’t created a Front-End for the application, it made it so much easier to work with. I personally learned a lot from the review as well, my main takeaway being the idea of middleware in APIs. The reason why it came up was because I had decided to have all the other HTTP verbs other than POST to send a not implemented error code if someone attempted to use it. I had done so by manually setting endpoints and I was given the suggestion of updating the application to use a middleware to do that job rather than manually setting the endpoints. Was definitely something I was interested in doing and so I took notes and decided I would look that up later.
All in all, I felt I did a great job delivering this and learned a massive amount from this entire experience!
Here’s a commit showing my reviewed app: https://github.com/chadstewart/you-go-backend-project/tree/79c5401ecd76675632ce1f13e63ab6aa70af037c
In the next article of this series, I’ll talk about some miscellaneous work I did such as logging, adding middlewares and making the image manipulations a service.
Top comments (0)