How to Use Node Modules on Cloudways

Learn how to use Node Modules on your Cloudways application. Cloudways Knowledgebase.

Emmad avatar
Written by Emmad
Updated yesterday

This guide will assist you in the process of using a Node module on Cloudways. We are going to use gulp with Laravel 5.3. All the node modules that you will install on Cloudways will be installed locally in your application. You could then set the relevant environment variable. You can install these modules either in your private_html folder or public_html folder.

First, we will install a gulp module in the public_html folder. Read here to learn how to connect with SSH. Use the following command to go into the public_html folder of your application.

cd applications/<applicationname>/public_html

How to Use Node Modules on Cloudways

Step 1: Installing Gulp

To install gulp locally, run the following command:

npm install gulp-cli

Step 2: Running A Gulp Task

Laravel 5.3 comes with several built-in tasks for gulp. Let’s watch those tasks.

node_modules/gulp-cli/bin/gulp.js watch

Gulp Use Cases

There are different use cases for Gulp, some of them are:

  • Running different tasks

  • Minifying JS and CSS

  • JS Obfuscation

  • Compilation of Sass and LESS

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?