Sunday, May 19, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 18766  / 2 Years ago, thu, august 11, 2022, 2:46:02

I have tried so far installed node.js and npm via



sudo apt-get install nodejs and sudo apt-get install npm . Then I tried typing node on bash nothing happens, I tried using node app.js nothing happens to no error


More From » software-installation

 Answers
3

From our discussion here



After installing node.js and npm



Create a symbolic link for node:



sudo ln -s /usr/bin/nodejs /usr/bin/node


Now verify commands working with



node -v
npm -v


Run it by using,



node hello.js



In order to test the application, open another terminal session and connect to your web server. Be sure to substitute in the app server's private IP address for APP_PRIVATE_IP_ADDRESS, and the port if you changed it:



curl http://APP_PRIVATE_IP_ADDRESS:8080



reference here


[#18224] Thursday, August 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
errettas

Total Points: 160
Total Questions: 118
Total Answers: 91

Location: Laos
Member since Fri, Sep 11, 2020
4 Years ago
;