Can someone explain me how I can use NPM packages in the backend? I mean, in which path do I run the NPM and how do I import the package in my javascript?
I wanted to install momentJS but I don't know how to do it, thanks.
Into the server folder, you have the package.json file, then there execute: npm install moment --save
package.json
npm install moment --save
Now to use it in the server-side code, just need to: const moment = require('moment');
const moment = require('moment');
Have fun 🥳