Quixjote Nova ~ Still Alive!
December 07, 2025, 07:26:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Calendar Shop Donations Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Node on Shared Hosting  (Read 9326 times)
0 Members and 1 Guest are viewing this topic.
Noctis
Bit
*

Hit Points: 1
Offline Offline

Posts: 1
1045.60 Gald

View Inventory
Send Money to Noctis

« on: December 05, 2019, 02:48:21 PM »

Installing Node (CPanel without the node package).
Prior to this working, you will need to request ssh access.

Download a SSH Client (I prefer PuTTy).

Login in to your domain with the port provided by Asura.

On the SSH, login with your username and password.

You are now in the root of your hosting directory.

Getting your first app up and running.


It crashed.  It always crashes.  (Automatic restarts)
NPM makes quick work of this.  From SSH:

Install Forever
Code:
npm install -g forever

Install nodemon (nodemon is not a requirement any longer)

Finally, init forever
Code:
forever -w start index.js 
index.js may be app.js for you.
This checks for file changes and restarts the server and forever again.

« Last Edit: February 21, 2020, 04:44:42 PM by Noctis » Logged
Quixjote
The Sweetest Honey!!!
Administrator
*****

Hit Points: 11
Offline Offline

Gender: Female
Posts: 750
8164.00 Gald

View Inventory
Send Money to Quixjote

Any questions not answered, available generally IM


« Reply #1 on: December 05, 2019, 03:53:28 PM »

The only thing I noticed with mine is when I used forever to launch my app, I had to specify the directory since I didn't install at base level. so for me I have been having to use this (before nodemon):

Code: (SSH/Terminal/CMD)
forever start ~/domains/nova-rpg.com/nrpg_node_server/app.js

I tried just doing app.js and it said it couldn't find it (go figure).
Logged

I can write better than anybody who can write faster, and I can write faster than anybody who can write better. -- A. J. Liebling (1904-1963)
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.021 seconds with 21 queries.