Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:02:26+00:00 2026-06-04T16:02:26+00:00

I have been playing around with Node’s REPL. I thought it would be pretty

  • 0

I have been playing around with Node’s REPL. I thought it would be pretty cool to make it available via a Socket, connect to it via Telnet/puTTY/whatever, and debug my server on-the-fly.

I used the example found here: http://nodejs.org/docs/latest/api/repl.html, which basically looks like this…

net.createServer(function (socket) {
  var cmd = repl.start(">", socket);
  //... some other stuff here.... not important
}).listen(5001);

OK, great! Now I can connect to port 5001 with Telnet and interact with the REPL. But, I am running into issues with control characters (i.e. Tab, Ctrl+C, up arrow, down arrow, etc.). How can I get these to work? For example, if I connect using telnet, type “1+1<Enter>”, I get 2. But, then when I hit “<Up Arrow><Enter>”, I get “…”, as if the REPL is waiting for me to finish the command. But, really, all I want to do is see the last command that I executed. I know Telnet likes to hold onto its output until a line feed is inputted, but is there any way to avoid this, as well?

$ telnet localhost 6634
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
>1+1
2
>^[[A
...

EDIT: I also found this issue, which may or may not be related – Arrow keys turn into control characters in Telnet

EDIT 2: Hmmm… rlwrap seems to solve most of my problem:

$ rlwrap telnet localhost 6634

Only thing that doesn’t work is tab completions of local/global variables, which I suppose I can live without. I was mostly concerned with the command history. rlwrap is neat!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:02:28+00:00Added an answer on June 4, 2026 at 4:02 pm

    See above.

    rlwrap telnet localhost 6634

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing around with Silverlight & F# and tried to make a
I have been playing around with the youtube API and node.js, so far I
I'm in the process of learning Node.js and have been playing around with Express
I have been playing around with Facial recognition in PHP via the face.com API.
I have been playing around with node.js, and coming from a Java background, I
I've been exploring javascript more deeply lately, playing around with a node,redis,socket.io,express simple webapp.
I have been playing around a bit with a fairly simple, home-made search engine,
I have been playing around with the MVP pattern using winforms for the last
I have been playing around with the Rhino ETL library and really like the
I have been playing around with NSURLConnection. Now I'm trying to grab some data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.