Considerations When Building Enterprise Node.js Apps


Many modern app development platforms, including MBaaS vendors, use Node.js for their backend server technology stack. Depending on the flexibility of the platform, your app requirements and IT policies may require you to deploy this Node.js app on-premise or in a public/private/hybrid cloud. Node.js, being a platform agnostic framework, can be deployed on pretty much any popular operating system: Linux, Unix, Mac, and Windows. While many platforms offer automated deployment to cloud-based infrastructure (PaaS), some platforms may provide the ability for you to download the Node.js backend server code and deploy it on your own infrastructure.

There are several different methods of deploying Node.js applications. The optimal method of deployment in your organization will depend on your team’s familiarity with Node.js, the number and types of other dependencies, and what your organization’s existing IT policies and practices are. Here are a few of the recommended methods for installing Node.js applications on your servers:

  • NPM based installation – This is the most common method of installing Node.js apps. NPM is a NodeJS package manager, which makes it easier to install the node packages along with all required dependencies. However, this method does require that your servers have external Internet connectivity especially to sites such as GitHub. Also, it is recommended that your sever allows SSH based access for all your required package installations.
  • Container based installation – This method is becoming more and more popular given the advancement in containerization technologies such as Docker. You can follow the standard process of creating a Docker container image of your Node.js app along with underlying OS and can port it over to your destination without worrying about leftover dependencies, incompatibilities, etc. This approach provides a more portable solution and works better for organizations that are looking to make sure that only approved software/packages make it to their servers. Again, in this method you have to make sure your server allows access to dockers (ask your IT) and more importantly the underlying OS is compatible with Docker. For example, RHEL 6 is not compatible with Docker.
  • Zip based installation – This is not a very common solution due to the high degree of fail points. You can have your Node.js app installed on a server using one of the methods above including all dependencies and required packages, zip the entire folder and port it over to the target server. The biggest requirement in this case is that your source system and target system need to be as close as possible in configuration (if not exactly same) to assure that application can be installed successfully. Failure of app not getting installed in this option is difficult to debug, but this option works as a good alternative in the organization where the first two options don’t work.
  • Third-pary Cloud based deployment – If you have access to the backend server code, you may also choose to deploy it to a third-party cloud PaaS that is different than what your MBaaS platform vendor offers by default. Most popular PaaS vendors, including Azure, Google, AWS, and Heroku, offer a standardized way of installing Node.js apps on their cloud based servers. These are offered as simple guided steps. Here is an example with Heroku PaaS.

The AnyPresence enterprise platform generates a non-proprietary Node.js backend server for your app. The solution includes the options to (1) deploy the server instantly to our own PaaS (running on Heroku and AWS infrastructure), or (2) download the source code and deploy the Node.js app on your own infrastructure using one of the methods above or via our SSH deployment option. You can get a free trial of our platform to try these options out, and you can contact AnyPresence at support@anypresence.com for installation guides or more information on deployment strategies.