Posts

Showing posts with the label object

Uploading Files to AWS S3 with NodeJS

Image
Introduction Amazon S3 (Simple Storage Service) is an object storage service offered by AWS. It's designed to be highly scalable, available, and secure, making it a popular choice for a wide range of use cases, from hosting static websites to storing backups and big data. Basic Concepts Object Is a file. Can include metadata to describe information for that file. Bucket Is where objects are stored. Can create one or many buckets in the regions that Amazon supports. The bucket name must be a unique name globally. Can configure permissions for the bucket to allow access and modification of files inside. Amazon S3 stores data as objects in buckets. AWS CLI First, access this link to install the AWS CLI according to the operating system you are using: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html Use the following command to check the version after successfully installing the AWS CLI: aws --version Next, use the following command to configure AWS inform...

Constants, Object.freeze, Object.seal and Immutable in JavaScript

Image
Introduction In this article, we're diving into Immutable and Mutable in JavaScript, while also exploring how functions like Object.freeze() and Object.seal() relate to Immutable . This is a pretty important topic that can be super helpful in projects with complex codebase. So, what's Immutable? Immutable is like a property of data in JavaScript. It means once the data is created, it can't be changed. This allows for better memory management and catching changes promptly. This is a big deal and totally contrasts with Mutable, which is the default nature when you initialize data in JavaScript. Implementing Immutable in a project makes development much smoother, reduces issues that crop up, and saves a ton of effort and time for maintenance down the road. But what happens if you don't use Immutable? Let me give you an example of how changing data during development can lead to some serious issues. let info = { name: "name" , address: "addres...