As part of this topic, we will how to setup the development environment to build web applications using Node JS based Frameworks.
- Setup Cygwin
- Setup Node and NPM
- Install Web Storm
- Setup Postman Client
- Install MongoDB along with IDE
- Install MySQL along with SQL Workbench
- 4 GB RAM and Dual Core laptop
- 64 bit processor and 64 bit operating system
- Chrome Browser (highly Desired)
Cygwin is Linux Terminal Emulator. Let us go ahead and setup Cygwin if you are using Windows for the development.
- Search for Cygwin using Google
- Download 64 bit setup file
- Install base packages
- Also setup tools like SSH (openssh) and telnet (inetutils). While SSH come handy to connect to other servers, copy files etc., telnet will help us troubleshooting network issues.
- In case of any additional tools, we can take care of those at a later point in time.
- As Cygwin work as Linux Terminal Emulator, root file system is / and then you will see a directory called cygdrive which will have Windows partitions such as C drive.
- One can use gitbash as well.
Setup Node and NPM
Let us setup Node and NPM on Windows or Linux or Mac. Instructions are more or less the same.
- Go to the official download page
- Choose appropriate 64 bit version based up on the platform (e. g.: Download 64 bit MSI file)
- Perform typical installation
- Restart Cygwin
- Create file called helloworld.js with code
- Run the program using
Install Web Storm
Node and NPM are primarily command line tools. They can be used to come up with the logic. However, to work in the team environment we need to fall back on IDEs.
- Web Storm is one of the leading IDE provided by Jet Brains.
- There are several advantages using Web Storm
- Auto Suggestions
- Refactor and Search Capabilities
- Ability to Debug
- Integration with Code Versioning tools
- Let us see how we can setup Web Storm on Windows. It works on Mac as well.
- Download Webstorm from here.
- On Windows it will download exe file
- Just double click to install
- Make sure to enable installation of JRE (if it is not already there)
- Create Hello World project choosing Node and Express.
Setup Postman Client
Let us setup Postman Client.
- Used to validate REST APIs.
Install MongoDB along with IDE
- Data is stored in BSON format (binary version fo JSON)
- Queries can be submitted using JSON format
- Schemaless and hence we can quickly integrate with the application layer.
- Open Source and hence free to use.
- Rich Querying capabilities including Aggregation Framework.
However, MongoDB is not very popular in building mission-critical transaction-based systems.
Let us go ahead and setup MongoDB as well as IDE if it is not done already.
- Download MongoDB from here by choosing appropriate platform (for windows it is MSI file)
- Perform typical installation.
- TBD: Start MongoDB Service and Validate
- We also need to setup IDE so that we can query the database with ease instead of struggling with Command Line.
Install MySQL along with SQL Workbench
MySQL is one of the popular open source relational database. RDBMS databases such as MySQL are used to build mission-critical transaction-based systems.
- Used for mission-critical transaction-based systems
- Open Source and hence it is free
- Need to pre-define schema
- Rich Querying capabilities using SQL
- Data Models are typically Normalized
There can be few initial hiccups while using MySQL with Node JS. Java-based frameworks such as Spring boot along with MySQL is popular choice than Node JS + MySQL.