I have been using Next.js to create a statically generated site based upon data from an external API. I’ve been having a lot of problems with repeated calls to the same api route (which returns the same data) each time.

The reason this is a bit of a headache for me is that:

  • I am paying for the api and I only have a fixed number of calls per day
  • If I hit the api too rapidly the api won’t return the data to me due to rate limiting.
  • It’s a waste of time and bandwidth hitting the same route…

Go to your site settings in Netlify and then select Build & Deploy.

I had found other guides for dockerising a React project using React Router and served using Nginx. However I kept on coming upon this error when going to an address that was not the root (ie /users or /posts). I could navigate through my React SPA and the address bar would update but when going directly to a route I would get a 404 error.

In my previous blog I took my Flask backend made it into a Docker image and deployed it onto an AWS EC2 instance.

This time I’m going to talk about how I used Docker to get my entire stack running on one server (in reality this probably isn’t ideal but I wanted to see if I could do it and I only have one free EC2 instance). My application consists of a React frontend, a Flask backend with a Celery worker, a Redis server for messaging and a MySQL server for the database.

I have created the Docker image for…

In my previous blog I implemented the use of Celery to manage asynchronous tasks (in my case sending emails).

The next avenue I’m looking to explore is containerisation with the long term goal of implementing continuous deployment. For my exploration of containers I will be using Docker which is the most popular containerisation solution. However first a bit about containers from Docker “A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.”

So rather than having separate virtual machines for each application…

Previous blog here.

After getting SQLAlchemy up and running in my project I then worked on creating the restful routes in the back-end and the fetches and forms to use them in the front-end.

So the next interesting and new to me piece of the puzzle was asynchronous task management and the reason for using it in my project is that I want to send emails.

When creating a user account I want to be able to send a welcome email to the new user. The whole process involves database operations to see if the username/email exists already, creating a…

Previous blog here.

Object Relational Mappers (ORM) are frameworks that bridges the gap between our classes in our object-oriented program and a relational database. The ORM will take the classes and create a database and tables based upon these. This means the programmer will not need to write their own SQL code for every database operation they want their program to do, hopefully leading to less bugs and a cleaner code.

Examples of ORMs are Hibernate (Java), Sequelize (node.js), Entity (C#) and SQLAlchemy (Python) which as I’m programming my backend in Python is what I will be using. …

Previous Blog here.

So in creating my baby change finder app I now have a front-end that displays a map with location markers on and this front-end fetches the data from my back-end API server.

So that’s it then? All good? Well if the application was only ever going to have these hardcoded places and it wasn’t necessary to add any more then it might be. However as discussed in the planning stage I want users to be able to add new places, update them and even add information such as reviews. …

Previous post here.

I have an overall idea of what I want to achieve so I now need to make a start and have to decide where. In this case I have decided to work from front to back for a few reasons, firstly I have never used the Google Maps API before and I’m unsure of what information it will need from my backend and I want to make sure I can get it working! If I was unable to get it working or it didn’t satisfy my requirements I would need to look for an alternative solution.


Standard coding post image

Since I have graduated from CodeClan I have worked on some freelance projects mainly using the languages I learnt on the course and have also been learning and enjoying Python.

So I have decided to do a personal project that would both consolidate my existing skills and put the new ones I have been learning into practice. The idea is to solve the problem of being a Dad out with a baby and needing to find somewhere you can change their nappy as baby change facilities are often located in the women’s toilets. …

Patrick O'Neill

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store