Jolt's REPL lets you connect to a remote node process.


511.0.24 years ago4 years agoMinified + gzip package size for @jolt-us/repl in KB


Jolt's REPL lets you connect to a remote node process.

npm install @jolt-us/repl
# OR
yarn add @jolt-us/repl

Start with creating a connection to you system

// index.js
const {Repl} = require("@jolt-us/repl");
const repl = new Repl({
   banner: "Connected to REPL on '"+process.env.NODE_ENV+"'",
   context: {users: require('./users-for-example')}

And create a client:

// repl.js
const {Repl} = require("@jolt-us/repl");

The setup is complete!🤖 Now let’s connect to the process using a secure shell connection!

ssh -t -c "node /var/app/repl.js"
Connected to REPL on 'production'
> users.activateUser("user-id")

Fun ain’t it?🎉 We have also added a custom behaviour — if you command returns a promise, it will wait for the promise to resolve, and only then print it out. And if the returned value is a function it will print out the toString value of it, so you can see its content.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.