@graphshieldhq/sidecar-js

0.10.47 • Public • Published

GraphShield Sidecar for Node.js and Javascript

This module is an isomorphic package for Node.js and Javascript that

# Install the @graphshieldhq/sidecar-js npm package
npm install --save @graphshieldhq/sidecar-js
# Run your app with the sidecar
node --import @graphshieldhq/sidecar-js ./index.js

💡 Technically you can also import the sidecar module directly from your app using standard import statement, but we strongly recommend to preload it using the node runtime using the --import CLI argument. Refer to the --import documentation.

⚠️ Modules preloaded with --require will run before modules preloaded with --import.

This technique could be applied to your package.json start script:

{
  "scripts": {
    "start": "NODE_ENV=production node --import @graphshieldhq/sidecar-js ./index.js",
  }
}

Or to the ENTRYPOINT / CMD of your Dockerfile:

CMD ["node", "--import", "@graphshieldhq/sidecar-js", "./index.js"]

💡 By default, GraphShield sidecar modules are redirecting requests to proxy.graphshield.io. to learn more about its configuration options.

/@graphshieldhq/sidecar-js/

    Package Sidebar

    Install

    npm i @graphshieldhq/sidecar-js

    Weekly Downloads

    3

    Version

    0.10.47

    License

    UNLICENSED

    Unpacked Size

    7.39 kB

    Total Files

    5

    Last publish

    Collaborators

    • guillaumemeyer