Before we can start writing-up some microservices, we’ll need to install a few mandatory prerequisites.
1. Compiler and IDE
First and foremost - we’ll need a compiler for your programming language of choice, as well as some sort of code editor. In our examples, we usually use Visual Studio Code, but any fitting IDE will do.
For working with the Node.js programming language, you’ll need to perform its installation and setup the environment. To do this, download and install Node.js from their official site https://nodejs.org/en/download/ . Select the download that corresponds to the operating system you’re using, and follow the installation instructions listed on their site.
Once installed, check that the installation was completed successfully by running the following command from your console:
node -version
If everything was installed successfully, the screen will display the latest version of the Node.js programming language. We’ll be needing a few additional instruments - use the following commands to install them as well:
# Install typescript compiler
npm install typescript -g
# Install typescript definitions utility
npm install tsd -g
# Install typescript api document generator
npm install typedoc -g
# Install mocha test runner
npm install mocha -g
For working with the .NET programming language, you’ll need to perform its installation and setup the environment. To do this, download and install .NET from the official site, as well as the following packages:
Visual Studio 2015 Professional or Community Edition: https://www.visualstudio.com
Core .NET SDK with Visual Studio extensions: https://www.microsoft.com/net/core
For working with the Golang programming language, you’ll need to perform its installation and setup the environment. To do this, download and install Golang from their official site https://golang.org/dl/ . Select the download that corresponds to the operating system you’re using, and follow the installation instructions listed on their site.
Once installed, check that the installation was completed successfully by running the following command from your console:
go version
If everything was installed successfully, the screen will display the latest version of the Golang programming language.
Once installed, check that the installation was completed successfully by running the following command from your console:
dart --version
Once installed, check that the installation was completed successfully by running the following command from your console:
python --version
2. MongoDB
Data microservice examples use MongoDB for storing data. You can either install MongoDB locally on your computer, or start it in a docker container.
To install MongoDB locally, download the installer from their official website . Select the download that corresponds to the operating system you’re using, and follow the installation instructions listed on their site.
3.Docker
To install Docker, download the Docker Desktop installer that corresponds to the operating system you’re using from the official Docker site. Once downloaded, launch the installer and follow the installation instructions.
Once installed, check that the installation was completed successfully by running the following commands from your console:
docker --version
If everything was installed successfully, the screen will display the latest version of Docker.
Now that we’ve got the environment set up, we can move on to Step 2. Setting up the project.