Quick File Server
Let's install a Quick File Server to serve files from a folder, we can use the serve package. Let's start by installing it using the following command $ npm install serve in your terminal.
Let's install a Quick File Server to serve files from a folder, we can use the serve package. Let's start by installing it using the following command $ npm install serve in your terminal.
To start a Node.js project, you need a package.json file, which acts as a project manifest. Use the $ npm init command to create it, providing details like project name, version, description, entry point, and author. This file manages dependencies, scripts, and metadata, forming the foundation for your Node.js project.
How Not to Install Node.js: A Better Way with fnm
When it comes to installing Node.js, not all methods are created equal. Many developers rely on their operating system's package managers, such as apt-get on Debian/Ubuntu, Brew on macOS, or Chocolatey on Windows. However, this approach often leads to outdated versions, inconsistent file placement, and potential security risks when using sudo to install global npm packages. Even downloading directly from the Node.js website has its drawbacks, particularly on macOS and Linux, where sudo is still required for global libraries.
Enter fnm: The Fast Node Manager
fnm (Fast Node Manager) is a lightweight and cross-platform tool designed to simplify Node.js version management. It allows seamless installation, uninstallation, and version switching based on the project directory. Compatible with popular shells like Bash, Zsh, and PowerShell, fnm integrates with .node-version and .nvmrc files, making it a fast and secure choice for managing Node.js versions.
Go and OOP
Go is not designed as a purely object-oriented programming (OOP) language in the traditional sense, like Java. However, Go includes certain features that allow for the use of OOP principles, but in a simplified and more flexible manner.
So, if you are is because you want to learn GO, and is possible that you comes from a Java platform, if not I recommend you to learn java.
Java, is a versatile programming language for consumer electronics, with wide adoption in devices from smart cards to supercomputers.
Java Ecosystem includes editions for specific purposes, like Java SE, Java ME.
Java's unique feature is its ability to run on any computer, a concept known as "write once, run anywhere."
Is possible that in your design you will encounter situations where beans have the Singleton Scope but dependencies on beans with the Prototype scope.
Spring has several ways to handle this problem: Proxy and @Lookup
Spring has six types of scopes: singleton, prototype, request, session, application, and websocket.
Singleton and Prototype are the two scopes that can be used in any application meanwhile the other four scopes are only available for a web application. For this entry we only focus on the Singleton and Prototype.
Spring gives the developer the control of how beans are wired. However, Spring also empowers developers with greater control over how beans are wired. There are a variety of options to choose from such as Constructor, Setter, and Field Injection
Spring has another a annotation that we can use when we have multiple beans to inject in a dependency, this annotation is @Qualifier. This annotation gives priority to one bean over others if two o more beans of the same type are found.