0

Is is possible to create JavaScript application that runs on command Line or terminal (NO CONSOLE) without any browser or using any .html file. You can execute this file from command line.

I want to create a simple calculator that ask for first number, then second number and then operation.

Demo how it should look in terminal (NOT CONSOLE) ?

Enter 1st number: 10
Enter 2nd number : 30
Enter operation : +
Result : 40

If yes, any one please guide me through?

Nakib
  • 4,593
  • 7
  • 23
  • 45

1 Answers1

1

You should cosider learn about nodejs:

http://nodejs.org/

And checkout express as its really easy and helps you setting out the initial configuration for a node app:

http://expressjs.com/

Also, check the accepted answer here:

How do I run JavaScript in a console like environment?

It talks about the chrome console.

Hope this resources help you out.

Community
  • 1
  • 1
taxicala
  • 21,408
  • 7
  • 37
  • 66
  • express is a framework create a web server. It doesn't seem like the OP wants to serve a website. – Felix Kling Mar 05 '15 at 18:54
  • I didnt say that express is explicity for console, I just recommended as a lecture in order to have more resources to work with nodejs – taxicala Mar 05 '15 at 18:55
  • Well, your statement makes it sounds like express is helpful to create any "node app", which is not the case. It's like you are trying to sell a car to a person and offer special rally tires (which the person will likely never need). – Felix Kling Mar 05 '15 at 19:09
  • I'm not selling anything, just sharing resources. – taxicala Mar 05 '15 at 19:19