Posts

CSS: An Easy Introduction to Beginners

Image
W hat is CSS CSS, or Cascading Style Sheets, is a language used to style the appearance of web pages. Imagine a web page without CSS – it would just be plain text. CSS is what makes websites look visually appealing by adding colors, layouts, fonts, and other design elements. Here is the example. The area labeled "HTML ONLY" shows how your website will seem if you use simply HTML, while the portion labeled "HTML WITH CSS" shows how your website will appear if you use HTML along with CSS. Cool right! Syntax of CSS (CSS in External file or Internal) Selector {     Property1: Value     Property2: Value } EX: p {     color: blue;     font-size: 24px; } Syntax of CSS (Inline) <span style="property1: value; property2: value;"></span> EX: <span style=" color: red; font-size: 40px; "></span> what is selectors? CSS selectors allow you to target specific HTML elements. You can select elements by tag name (e.g., h1, p), class (e.g., .

Free AWS RDS Hosting Plans for Databases (mysql, postgres) in 2024

Image
AWS RDS (Relational Database Service) is a fully managed database service provided by Amazon Web Services. It supports several popular database engines such as MySQL, PostgreSQL, Oracle, and SQL Server. With RDS, users can easily set up, operate, and scale relational databases in the cloud without worrying about infrastructure management tasks.  The pricing calculation for your instance can be created by visiting:  For Postgres: https://calculator.aws/#/createCalculator/RDSPostgreSQL For mysql: https://calculator.aws/#/createCalculator/RDSMySQL I have calculated the minimal database hosting requirement while keeping in mind the minimum server configuration and the minimum 150 hours of usage per month. Amazon RDS for postgres 12month free - 750hrs/m, 20GB of storage, backup and snapshot. Amazon RDS for mysql 12month free - 750hrs/m, 20GB of storage, backup and snapshot.

Transitioning from JavaScript to Node.js

Image
JavaScript developers who initially focused on front-end development may transition to Node.js to become full-stack developers. This enables them to work on both the client side (browser) and server side As JavaScript developer, we know that the language is client-side, meaning it can run in a browser environment only and access browser APIs such as DOM and web APIs. What if we want to run javascript outside of a browser (client side)? Can we run javascript in server side like java? Well the answer is NO. With the help of Node.js, Javascript may now be executed on the server side.   How? Let's explore what node.js is and how you can use it to run JavaScript on the server side. Node JS Node JS is itself a runtime environment for executing javascript code outside browser(Client Side) i.e, on server . It uses Chrome’s V8 javascript engine to do that. And it provides additional built-in library for handling various tasks such as file I/O, networking and HTTP operations.   Because of

SOAP Explained: With Javascript

What is SOAP? SOAP is like a set of rules that helps different computer programs talk to each other. Imagine you have two friends who speak different languages. SOAP is like a universal translator that helps them understand each other. Now, when these programs talk, they use a special type of text called XML. It's like a format that's easy for both programs to read, like having a conversation in a language that both friends understand. So, SOAP is kind of like a language translator for computers, and XML is the language they use to communicate. This way, even if two programs are running on completely different systems, they can still understand each other and share information. SOAP Request A SOAP request consists of a SOAP envelope that contains the SOAP header and the SOAP body. Here's a basic example of what a simple XML request in SOAP might look. <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope     xmlns:soapenv="http://schemas

How to create an API in Next.js

Image
Next.js , an advanced React framework, streamlines web application development with features like server-side rendering and automatic code splitting. Creating APIs in Next.js is advantageous due to its built-in API routes feature, offering a seamless and integrated approach for handling server-side logic or connecting to databases. This simplifies the development process, ensuring efficient communication between the frontend and backend within the same framework. Route Handlers allow you to create custom APIs. Note: Route Handlers are only available inside the app directory.  Route Handlers are defined in a route.js|ts file inside the app directory. app/api/route.ts export const dynamic = 'force-dynamic' // defaults to auto export async function GET(request: Request) {} Supported HTTP Methods are: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS . Example: export async function GET() {   const res = await fetch('https://data.mongodb-api.com/...', {     headers: {

Steps to Configure Postgres in Vercel with your Next.js project

Image
Vercel is a cutting-edge cloud platform renowned for its seamless deployment and hosting solutions, designed to simplify the process of deploying web applications. With its emphasis on serverless computing, global content delivery, and continuous deployment, Vercel empowers developers to focus on building exceptional user experiences. Hosting Postgres on Vercel enhances your application's performance and scalability.  Leveraging Vercel's serverless architecture and global CDN ensures rapid access to your database, while its straightforward integration and automatic scaling capabilities make managing Postgres hassle-free, allowing you to concentrate on crafting robust and efficient applications. Steps 1. Create a project 2. Go to Storage 3. Create Postgres database Connect Store → Create New → Postgres → Continue 4. Copy the secret to .env file 5. Install Postgres sdk npm i @vercel/postgres