Category: Uncategorized

  • Discordjs Cheatsheet

    HelloWorld discordjs bot The very basic hello world bot can be coded by copying this: This bot will respond with pong when the user messages ping in the channel. Make sure that you add the token from discord developers section for this bot. Check if bot can assign a role to users This needs 2 […]

  • Deploy full stack React app on AWS EC2 (or any vps)

    In this tutorial we will configure a vps server using aws ec2 instance to run nodejs app along with nginx as a reverse proxy. Don’t get confused, it sounds complex but it’s just a straight forward process. AWS EC2 vs Amazon Amplify or Heroku to host full stack react app Note that this is also […]

  • Setup Nginx on Virtual Server & deploy React app, Server & Client

    In this tutorial we will configure the nginx on a virtual server (aws EC2 in our case, but can be any virtual server from any other provider like digital ocean, google cloud console, etc.). Static / Persistent / Elastic IP If you’re on amazon aws then you need to setup elastic ip for this ec2 […]

  • How to open ports for aws EC2 instance

    When we crreate new aws ec2 instances, they only have port 22 opened by default due to default security policy. If we want to use this instance as a webserver for our websites or for nodejs apps or node servers running behind react app, etc., we need to open relevant ports on the aws ec2 […]

  • How to create AWS EC2 instance & login using .pem

    This tutorial explains how you can create a cloud virtual server on amazon, called aws EC2 instance. We will create a free tier instance running latest ubuntu and login to it using the .pem file provided by amazon. This post contains: How to create an AWS EC2 instance How to connect to aws EC2 instance […]

  • How to reset nginx on server

    Nginx configuration can be confusing sometimes. You could simply mess up your whole server while playing around with it and following steps on every random tutorial that you encounter online. In that situation, instead of trying to fix the bug that you created yourself, it’s sometimes useful to just start fresh and reset the nginx […]

  • How to login to aws ec2 instance using password

    Aws ec2 instance creates virtual server for us and provides us with a .pem file to login into the server. This is no doubt a very useful and secure process, however, it doesn’t allow logging in using the password by default. To login to aws ec2 instance using password, we need to do following steps: […]

  • How to keep nodejs server alive using pm2

    Node.js server can be run by simply pointing it to a file that we want it to run, e.g: Or you can also use npm to run your file if you have defined the start procedure in your package.json file. However, as soon as you close the terminal, the server stops. Is there a way […]

  • ufw firewall to view & open ports

    To make sure which ports are open on your server firewall, run this command: This will give you a list like this: Make sure that your port is listed there. Port 80 is used for all normal web traffic (non ssl) and port 22 is used for SSH / SFTP. You can open new ports […]

  • ERROR: FPM initialization failed [Solved]

    The error was encountered when adding new virtual server (new domain) to virtualmin. The server was running bot PHP as cgi and also as php-fpm. However, while configuring the new domain, we got an error that php8-fpm could not restart. Upon debugging, we got the error: This error is because of, as it mentions, an […]

Hire Me!