# Node.js -------------------------------------------------------------------------------- title: "Overview" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.635Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/overview/" service: "Serverless" -------------------------------------------------------------------------------- # Node.js ### Overview The Node.js programming environment boasts of a variety of frameworks for both server-side and web client development, and even a host of full-stack frameworks. These frameworks are equipped with pre-written libraries, templates, plugins, and features upon which you can build your own code. Some frameworks are MVC-oriented, some contribute to building end-to-end dynamic web apps or REST APIs, while some are mounted on top of other frameworks. Based on your application needs, you can opt for the right framework. AppSail does not provide any templates for specific Node.js frameworks, and therefore does not contain any framework restrictions. You can build your app service using any Node.js technology that you prefer, and incorporate any libraries, modules, or dependencies. You can then directly select a Node.js runtime while initializing the app service in the CLI, and deploy it to AppSail. The Node.js help guide contains step-by-step instructions on building basic sample apps with some of its most popular frameworks, deploying these apps as AppSail services, and configuring {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup commands{{%/link%}} as required. ### Prerequisites {{%link href="https://nodejs.org/en/download" %}}Download{{%/link%}} and install Node.js on your local machine. -------------------------------------------------------------------------------- title: "Express" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.635Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/express/" service: "Serverless" -------------------------------------------------------------------------------- # Express Framework {{%link href="https://expressjs.com/" %}}Express{{%/link%}} is a highly robust and minimalist framework that comes bundled with a host of HTTP utility methods and middleware. This example illustrates the steps to build a simple Node.js app with the Express framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Express app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Now, add the express module to your application using the {{%link href="https://www.npmjs.com/" %}}npm{{%/link%}} package manager by executing the command: {{%code class="language-javascript"%}}npm install --save express{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}const express = require('express') const app = express() app.all('/', (req, res) => { res.status(200).send("Hello World") }) app.listen(process.env.X_ZOHO_CATALYST_LISTEN_PORT || 9000, () => { console.log("Server Started") }){{%/code%}} 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 6. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}node index.js{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Express with NPM" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.636Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/express-npm/" service: "Serverless" -------------------------------------------------------------------------------- # Express Framework With NPM This example illustrates the steps to build a Node.js app with the Express framework, then configuring a {{%link href="https://www.npmjs.com/" %}}Node Package Manager{{%/link%}} (npm) {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} in one of the configuration files through scripts. This application will be bundled and associated with an AppSail service, and deployed to the console, before you configure the startup command in the console. 1. Create a new folder in your local system for the Express app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Now, add the express module to your application using the npm package manager by executing the command: {{%code class="language-javascript"%}}npm install --save express{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}const express = require('express') const app = express() app.all('/', (req, res) => { res.status(200).send("Hello World") }) app.listen(process.env.X_ZOHO_CATALYST_LISTEN_PORT || 9000, () => { console.log("Server Started") }){{%/code%}} 5. Open the {{%link href="https://docs.npmjs.com/cli/v9/configuring-npm/package-json" %}}{{%badge%}}package.json{{%/badge%}}{{%/link%}} configuration file in the application's directory. Inside the {{%badge%}}scripts{{%/badge%}} key in the file, you must add a new key: {{%badge%}}start{{%/badge%}} and configure its value as: {{%badge%}}node index.js{{%/badge%}}. This defines the startup command for the application. You can then refer to this key while adding the startup command. 6. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 7. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 8. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 9. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}npm start{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Hapi" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.636Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/hapi/" service: "Serverless" -------------------------------------------------------------------------------- # Hapi Framework {{%link href="https://hapi.dev/" %}}Hapi.js{{%/link%}} is a Node framework that helps you build scalable web applications, HTTP-proxy applications, APIs, and more. Hapi offers a robust plugin system, a comprehensive and integrated authentication architecture, end-to-end high security, and more. This example illustrates the steps to build a simple Node.js app with the Hapi framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Hapi app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Add the Hapi module to your application using {{%link href="https://www.npmjs.com/" %}}npm{{%/link%}} by executing the command: {{%code class="language-javascript"%}}npm install --save @hapi/hapi{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}'use strict'; const Hapi = require('@hapi/hapi'); const init = async () => { const server = Hapi.server({ port: process.env.X_ZOHO_CATALYST_LISTEN_PORT | 9000, host: '0.0.0.0' }); server.route({ method: 'GET', path: '/', handler: (request, h) => { return 'Hello World!'; } }); await server.start(); console.log('Server running on %s', server.info.uri); }; process.on('unhandledRejection', (err) => { console.log(err); process.exit(1); }); init();{{%/code%}} 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 6. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}node index.js{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Koa" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.636Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/koa/" service: "Serverless" -------------------------------------------------------------------------------- # Koa Framework {{%link href="https://koajs.com/" %}}Koa{{%/link%}} is a Node.js middleware framework that is minimal and expressive in nature, and enables you to build robust web applications and APIs. Koa uses async functions that remove the need for callbacks, handles errors efficiently, and substantially reduces your time in building servers through a multitude of other features it offers. This example illustrates the steps to build a simple Node.js app with the Koa framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Koa app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Add the Koa module to your application using {{%link href="https://www.npmjs.com/" %}}npm{{%/link%}} by executing the command: {{%code class="language-javascript"%}}npm install --save koa npm install --save @koa/router{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}var Koa = require('koa'); var Router = require('@koa/router'); const app = new Koa(); const router = new Router(); router.get('/', (ctx, next) => { ctx.body = "Hello World" }); app.use(router.routes()) app.listen(process.env.X_ZOHO_CATALYST_LISTEN_PORT | 9000);{{%/code%}} 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 6. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}node index.js{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Fastify" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.639Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/fastify/" service: "Serverless" -------------------------------------------------------------------------------- # Fastify {{%link href="https://www.fastify.io/" %}}Fastify{{%/link%}} is a high-performance, highly-extensible Node.js framework with minimal overhead, that helps you create reliable and efficient applications and APIs. Fastify brings in a host of convent features, such as affordable logging, Schema support, TypeScript-readiness, and various other developer-friendly features. This example illustrates the steps to build a simple Node.js app with the Fastify framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Fastify app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Add the Fastify framework to your application using {{%link href="https://www.npmjs.com/" %}}npm{{%/link%}} by executing the command: {{%code class="language-javascript"%}}npm install --save fastify{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}// Require the framework and instantiate it const fastify = require('fastify')({ logger: true }) // Declare a route fastify.get('/', async (request, reply) => { return { hello: 'world' } }) // Run the server! const start = async () => { try { await fastify.listen({ port: process.env.X_ZOHO_CATALYST_LISTEN_PORT | 9000 , host: "0.0.0.0" }) } catch (err) { fastify.log.error(err) process.exit(1) } } start(){{%/code%}} 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 6. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}node index.js{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Restify" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.641Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/nodejs.md/restify/" service: "Serverless" -------------------------------------------------------------------------------- # Restify Framework {{%link href="http://restify.com/" %}}Restify{{%/link%}} is a Node.js framework that helps you build RESTful web services specifically with a focus on high performance, and provides features that facilitate optimal error handling, versioning, and semantics-support. Restify also offers router introspection, datastore support with popular SQLs, and many other additional conveniences. This example illustrates the steps to build a simple Node.js app with the Restify framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Restify app. 2. Navigate to the directory from your terminal and initialize Node with the following command: {{%code class="language-javascript"%}}npm init{{%/code%}} Follow the steps in the terminal and provide the required details. 3. Add the Restify framework to your application using {{%link href="https://www.npmjs.com/" %}}npm{{%/link%}} by executing the command: {{%code class="language-javascript"%}}npm install --save restify{{%/code%}} 4. You can now add the logic you require in the application's code in the main file. Given below is a sample code for a basic "Hello World" program. {{%code class="language-javascript"%}}var restify = require('restify'); var server = restify.createServer(); server.get('/', function respond(req, res, next) { res.send('hello world'); next(); }); server.listen(process.env.X_ZOHO_CATALYST_LISTEN_PORT | 9000, '0.0.0.0', function () { console.log('%s listening at %s', server.name, server.url); });{{%/code%}} 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack:** Node16 6. Ensure the main file, configuration files, and the node modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-javascript"%}}node index.js{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}.