- Windows 10 or Linux or MacOS, 64 bit
- RAM, 16GB required, 32GB preferable
- 128 GB Storage (SSD would be preferrable)
- 4 Core CPU
Download IntelliJ IDEA Ultimate and install. In case you already have it installed and your license has expired, we will provide you a valid license for the duration of the course. In case you prefer using another IDE, that's also fine as the examples do not make use of any IDE specific functionality.
- Java Development Toolkit, download and install the latest LTS version JDK 17. Create then an environmental variable named JAVA_HOME pointing to JDK installation folder.
- Maven, download Maven and follow the instructions. Through Maven dependency management mechanism, we will download every library needed in our projects. Create then an environmental variable named MVN_HOME pointing to Maven's installation folder.
- Add %JAVA_HOME%\bin and %MVN_HOME%\bin to your PATH envrionmental variable.
Starter kit for developing web apps with Code.Hub and Angular.
The Recommended Setup includes the following software:
- Visual Studio Code (VSCode)
- Node.js
- npm
Find below the installation instructions:
-
Download and install VSCode editor.
-
Download and install an LTS version of Node.js. To verify that you have installed it correctly type the command
node -v
in a command line window and it should display the installed version of Node.jsAngular applications require an LTS version of Node.js in order to work properly.
-
Npm is already included in Node.js. To verify that you have it, type the command
npm -v
in a command line window and it should display the installed npm version.Windows users: if the previous command is not working, verify that the path of the npm executable has been added to your PATH environment variable.
To verify that you have set up your local environment correctly, follow the steps below.
-
Clone this repository locally by running the command:
git clone https://github.com/codehub-learn/angular-starter-kit.git
-
Navigate to the newly created
angular-starter-kit
folder and install the project dependencies:cd angular-starter-kit npm install
-
Run the following command to install Angular CLI:
npm install -g @angular/cli
You should see the following:
-
Run the Angular Starter Kit application using the command:
ng serve -o
You should see the following:
- Download and install Git Version Control.
- Create a Github account.
In order to complete the development environment landscape, we must install the Oracle Database Express Edition and MongoDB Community Server. In order to both optimize the administration effort and align with development best practices, we will use Docker to install them.
In the following section we will describe in details the process of setting up Docker on a Windows 10/11 machine, the aforementioned servers and any accompanying software such as query editors.
- Make sure your Windows installation has the latest updates installed.
Settings > System > About > Windows Version = Windows 10 version 21H2.
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to install the WSL on Windows 10 and press Enter:
wsl --install
- Restart your computer to finish the WSL installation on Windows 10.
- To set v2 as the default version for future installations, run:
wsl.exe --set-default-version 2
- Continue with the Linux distro setup as necessary.
Once you complete the steps, the required Linux components will automatically install the latest version of the Ubuntu Linux distribution.
To update the WSL kernel to the latest version, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to update the WSL kernel and press Enter:
wsl --update
Once you complete the steps, if an update is available, then it will download and install on the device.
If the update command doesn’t work, open Settings > Update & Security > Windows Update > Advanced options, and turn on the “Receive updates for other Microsoft products when you update Windows” toggle switch.
Note:
If you are receiving the error message "Error: 0x80370102 The virtual machine could not be started because a required
feature is not installed.",
read this article.
Also, make sure you haven't disabled virtualization in the BIOS.
-
Go to hub.docker.com and create your account, if you don't already have one.
-
Sign in and download Docker Desktop.
-
Follow the usual installation instructions to install Docker Desktop. If you are running a supported system, Docker Desktop prompts you to enable WSL 2 during installation. Read the information displayed on the screen and enable WSL 2 to continue.
-
Start Docker Desktop from the Windows Start menu.
-
From the Docker menu, select Settings > General.
-
Select the Use WSL 2 based engine check box. If you have installed Docker Desktop on a system that supports WSL 2, this option will be enabled by default.
-
Click Apply & Restart.
-
When Docker Desktop starts, go to Settings > Resources > WSL Integration. The Docker-WSL integration will be enabled on your default WSL distribution. To change
your default WSL distro, runwsl --set-default <distro name>
E.g., to set Ubuntu as your default WSL distro, run
wsl --set-default ubuntu
Optionally, select any additional distributions you would like to enable the Docker-WSL
integration on.
- In Windows with WSL2, we strongly
recommend Windows Terminal
from the Windows Store. It's a fantastic
Command Prompt replacement from Microsoft. Once you have it installed, also install
Ubuntu, or your favorite WSL2 Linux distribution from the Windows Store as well (or multiple distros), and you'll see a new Windows Terminal option to start a shell in that Linux distro. It's fast and feels Linux-native. - Additionally, we can
install Docker Completion for Powershell by Mat Gucci by issuing
these commands:
Install-Module DockerCompletion -Scope CurrentUser Import-Module DockerCompletion
- To make to Docker Completion start automatically every time we open a Powershell terminal,
we will make use of PowerShell profile by issuing these commands:New-Item $PROFILE -ItemType File -Force Add-Content $PROFILE 'Import-Module DockerCompletion'
- Download SQL Developer. Unzip the file and run the executable as it does not need installation.
- Create a directory to host the database data files e.g. $home/dbdata/oracle/oradata.
- Open a Powershell terminal and run the following command to download and run the latest Oracle Database Express
Edition as a Docker image. Note that the SYS_PASSWD you are asked to provide is the password for the
administration users SYS and SYSTEM.
docker run -d --name xe -p 1521:1521 -e ORACLE_PASSWORD=<SYS_PASSWD> -v $home/dbdata/oracle/oradata:/opt/oracle/oradata gvenzl/oracle-xe:slim
- Keep in mind that Oracle 21c XE has resource limitations: 2 CPU threads. 2 GB of RAM. 12GB of user data.
- We need to connect to the Oracle instance in order to create a user whom or application will use to connect to the
database. To do this run
docker exec -it xe bash -c "sqlplus /nolog"
- Connect as DBA:
and enter the password we passed as parameter in step 2.
connect sys as sysdba;
- Connect to Pluggable Database (PDB):
alter session set container=xepdb1;
- Create the user whose credentials will be assigned to the application we are going to develop, provide
corresponding password and assign to him all privileges:
alter session set "_ORACLE_SCRIPT"=true; create user <USERNAME> identified by <PASSWORD>; grant all privileges to <USERNAME>;
- Connect using SQLDeveloper by defining as Service the value XEPDB1.
- You are ready to interact with Oracle Database.
- Create a directory to host the database data files e.g. $home/dbdata/mongo.
- Open a Powershell terminal and run the following command to download and run the latest MongoDB Community
Server as a Docker image. Note that the MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD you are
asked to provide are the administrator's credentials.
docker run -d --name mongo -e MONGO_INITDB_ROOT_USERNAME=<USERNAME> -e MONGO_INITDB_ROOT_PASSWORD=<PASSWORD> -p 27017:27017 -v $home/dbdata/mongo:/data/db mongo --wiredTigerCacheSizeGB 0.5
- Please note that by default, Mongo will set the wiredTigerCacheSizeGB to a value proportional to the host's total memory regardless of memory limits you may have imposed on the container. In such an instance you will want to set the cache size to something appropriate, taking into account any other processes you may be running in the container which would also utilize memory. See the upstream "WiredTiger Options" documentation for more details.
- Download a client GUI to connect to MongoDB. You may choose Mongo Compass or Studio3T. Connect using the credentials you provided above, connect, and you are ready to start using Mongo.