Getting Started with Apps-Engine
    • Dark
      Light
    • PDF

    Getting Started with Apps-Engine

    • Dark
      Light
    • PDF

    Article summary

    Throughout the entire process, an active internet connection is required.

    Prerequisites

    Before beginning, the following must be installed on your machine:

    To develop a Rocket.Chat App, you must write TypeScript code. Although the Apps-Engine CLI manages the majority of definitions, you must grasp where the code guides you to comprehend how your application interacts with the Rocket.Chat server and external APIs.

    About Rocket.Chat server

    To test your applications, you will need an active server. Ideally, this would be a test environment so as not to impact the production environment. The following components are related to the Rocket.Chat server and there is no action required from your end:

    • Server management and package manager: To develop a full-stack JavaScript application, a server-side JavaScript runtime, and a package manager are required. Node.js can be used as the server environment, as it can serve files and connect to the database using JavaScript. For the package manager, we recommend using Yarn due to its faster library installation, better security features, and reliability in managing dependencies.

    • Database: You need a database to store your application data. The Rocket.Chat server uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data.

    About Node.js VM module

    Node.js is a cross-platform, open-source JavaScript runtime environment extensively used to develop server-side and networking applications. Node.js is designed on top of Chrome's V8 engine, allowing developers to run Javascript programs exceptionally quickly by compiling them directly to machine code.

    The virtual machine (VM) module is a fundamental feature of Node.js that allows developers to execute programs in a VM context. The VM module provides access to APIs for compiling and executing code within the context of a V8 VM. The Rocket.Chat Apps-Engine is built on top of the Node.js VM module; therefore, most of the environment configuration will involve launching the VM module within your Rocket.Chat workspace.

    About context

    With the help of the VM module, a context is an alternative environment that is created. This environment consists solely of key-value pairings, each of which runs directly on top of the V8 engine.

    The aim of using the Node.js VM module was to isolate each app on its own scope, preventing them from interacting directly with the host Rocket.Chat server or other apps, so they couldn't inject data and disrupt the system or expose data from other sources. In addition, it is also to avoid the complication of spawning, controlling, and managing the communication of external processes to execute these logics.

    Note: The app doesn't have direct access to the VM's APIs. This information is for your understanding.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence