Skip to Content

Prepare the Local Development Environment

test
0 %
Prepare the Local Development Environment
Details

Prepare the Local Development Environment

July 30, 2020
Created by
July 29, 2020
Install essential runtimes and tools for local development.

You will learn

  • How to install Node.js and npm (Node Package Manager) as a runtime
  • How to install essential tools like git and Cloud MTA Build Tool (mbt)


Step 1: Install the Node.js runtime

Node.js is a server-side runtime environment built on Chrome’s V8 JavaScript engine. It provides an event-driven, non-blocking (asynchronous) I/O and cross-platform runtime environment. It enables you to build scalable server-side applications using JavaScript and is open-source.
 
Node.js can be used to build applications like command-line applications, web applications, REST API servers, and many else. It is mostly used to create network programs like web servers. For more information, visit the official site at https://nodejs.org.

Before you can start building your Node.js app, you need to install npm and Node.js. npm is included in the Node.js installation.

It is possible to download the libraries and organize the directories on your own and start that way. However, as your project (and list of dependencies) grows, this will quickly become messy. It also makes collaborating and sharing your code much more difficult.

We recommend using a package manager on your OS.

Install the Windows package manager Chocolatey.

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Install Node.js

choco install nodejs

Install the Mac package manager Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Node.js

brew install nodejs

Install the Node.js from the official website.

How do you install the node package manager (npm)?
×
Step 2: Verify your installation

To verify if the installation was successful, check the npm and node.js version. Open the command line and print for the installed version.

node -v
npm -v
Log on to answer question
Step 3: Install the cloud MTA build tool

This tool will create so-called .mtar archives, which are deployable packages that contain your entire project. The tool itself is an OS-dependent binary, but you can leverage npm to install the right version for your OS and append it to the Path variable. Run the following command to install this tool:

npm install -g mbt

This tool depends on GNU make. In case this tool is not installed on your machine, run choco install make to install it.

This tool depends on GNU make that is most likely already installed when you use a Unix-based OS. In case this tool is not installed on your machine, install it from here.

Log on to answer question
Step 4: Install git

Another tool that you will use often is git. It will allow you to copy (aka clone) existing code project from compatible pages such as https://github.com.

Use the package manager from step 1 to install this tool as well.

choco install git
brew install git

Install the git from the official website.

Log on to answer question

Next Steps

Back to top