I'm running a Marklogic server with an exposed REST API. I have extended the API with my own resources. These endpoints are just .sjs files as dictated by the documentation. Is it possible to use regular node modules (installed via npm) in these sjs files?
I'm using ml-gradle to deploy the server and endpoints. I'm not which directory I would install the npm modules.
I try doing an npm install and then importing it with a relative path
const lodash = require('../node_modules/lodash')
However, my sjs file can never find those modules. I'm assuming the import path I give it is not correct.