Can we use node packages in wappler

I want to use third party node packages for my work, is it possible in Wappler.

Have a look at this video where I have installed a node package.

Can I use them in backend of Wappler ? And also for front-end for scripts ?

Yes to both.

Is there any other tutorial for that ?

I want to use packages like webpush

No. There are hundreds of node packages each with their own unique methods. It is best to follow the instructions within the package.

I want to use webpush packages in my nodejs projects backend service to send notification, how can I achieve this in Wappler ?

Your tutorial video was to use package to create a front end file, How can I use packages which are used for scripts ?

The instructions can be found at

To install the package: npm install web-push --save

Have you had a look at

This document didn’t really explain on how to use a third party npm package

Which document are you referring to? The NPM package or the Chat Application.

The mention of the Chat App was an off-topic inclusion, which I should not have done.

The NPM package gives you all of the relevant details.

What I want know is, How can I write a script using the npm package in the Wappler backend ?

A tutorial to use this in Wappler.

You can search for „Custom Module“ in the forum. I think this is the easiest way of using a npm package.

You can also take a look at the following posts of the Wappler team:

You can’t use Node Packages for front-end.
They can be installed via packages.json, or via terminal/cmd.
But can be used only on back-end via Custom Modules in Wappler.
Example links as shared on the post above. You can search for many other such posts about custom modules.

Not without something like:

https://browserify.org/

2 Likes

How am I supposed to call these function in the backend ?

Please look at the documentation link shared and search the community for various implementations of custom modules for NodeJS.

what are display type name for variable and datascheme type in custom module file?

I want to pass an array returned by the database query.

Again, all part of the documentation.

Wappler mainly relies on JSON data everywhere. So if you pass the data returned by a multi-query step into your custom module, you can bind it on the field in UI & in your custom code, you will receive a JSON array.