Host the server container in an AWS ECS Fargate cluster

We have already created a Docker image for the server using Nginx. We will create an AWS ECS Fargate cluster in AWS and host the container there. Create an ECR repository for the image Select the Elastic Container Registry Create a new repository Enter a name, enable Tag immutability and Scan on push Select the repository you just […]

Deploy a new version of a task in an ECS Fargate cluster

To deploy the new version of a Docker container image and launch new tasks with the new version Build and push the new Docker image Build the new Docker container image Push the new image to ECR (Elastic Container Registry) Create a new revision of the ECS Task Definition Open the ECS section of the […]

Phaser 3 game sprites are not displayed on iOS, iPad and iPhone

If the Phaser 3 game sprites are not displayed on iOS change the type in the index.js file to type: Phaser.CANVAS In CANVAS mode Phaser cannot set the background color with this.cameras.main.backgroundColor or this.backgroundColor. Set the background color too in the index.js file as seen above.

Attach an AWS EBS volume to a Linux server

Format and mount the volume List the available disk devices and their mount points The nvme1n1 volume is not yet mounted Create a partition on the volume List the existing partitions Create a new partition Check the partition list lsblk Detect the new partition with If there is a file system on the partition to […]

has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

When your website calls the Socket.IO backend API from another domain, the browser console displays the error message Access to XMLHttpRequest at ‘http://…:3000/’ from origin ‘http://….com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. To enable Cross-origin resource sharing add the code to the top of your Socket.IO […]

Uncaught TypeError: _helpers_formUtil__WEBPACK_IMPORTED_MODULE_6___default.a is not a constructor

When you import a Phaser 3 module and run the Node.js web application the following error is displayed Uncaught TypeError: _helpers_formUtil__WEBPACK_IMPORTED_MODULE_6___default.a is not a constructor Make sure the imported module and all dependent modules imported by that module has the following class definition format

Creating a multiplayer online card game with Node.js and Phaser 3

As the world is locked down due to the COVID-19 Corona Virus, we are quarantined at home. We miss the company of our families and friends, so online games are the only option to play together. We are going to create an online multiplayer game that can be used for any tabletop gameplay. The frontend […]