Deploy SandBox NodeJs Apps
How to deploy NodeJS Apps on Eenos ?
This document will help you to deploy a NodeJs app on your eenos hosting control panel. Eenos control panel is a modern hosting control panel designed for modern apps.
Features Of Eenos NodeJs App Management
Eenos control panel have the following wonderful features for easilyeasy managingmanagement of nodeJs appsapps.
- Manage unlimited NodeJs app domains or subdomains
- NodeJs version Selector
- Deploy NodeJs App with One click
- Set to Production or
DevelopmetDevelopment Mode
Every eenos NodeJs app have its on virtual environment. So migration and transfer of hosting accounts are easyvery easy.
To start deploying NodeJS appapp, loginslogin to your eenos control panel and go to the following Page:
Node.Js -> Deploy Node.Js Apps
Setup NodeJs SandBox and Install Apps
Now you need to fill the simple form as follows,
ChoseChoose Domain For Node.Js App : Select a domain or subdomain for deploying a NodeJs app. This is the website url you are going to deploy the app.
ChoseChoose Node.Js Version : The version of the Node.Js distribution required for your projectproject.
Now you need to set the App settings too .,also, so that the server knowknows where to start the applicationsapplications.
App Startup Script : This is the app entry point script. It is normally a javascript file in project document root ( eg : app.js )
Public Folder Name : This is where you upload your static files like CSS, JS , ImagesImages, ,etc,etc .
Project Publicity Type : This option will help you to setup the project in either production or development mode.
Install Demo App : If you wish to install a demo nodejs app, chosechoose install. You haveIf you already developed the app, you can select no and upload the files yourself.
NowNow, Click the button Deploy App and it will start deploying the app.
MangeManage NodeJs App From Shell
If your hosting account have enabled ssh access.access, Youyou can easily manage your NodeJS app from the shell too. You may contact your hosting server provider and enable the ssh shell to access this feature.
You may login to the server with the ssh client from your desktop.
HereHere, we are going to use the following details to show you how to manage NodeJS app from eenos sever shell virtual environment.
Example eenso user : myuser
Example NodeJs app domain : nodejs.mydomain.com
Example eenos ssh sever port : 22
Document Root of the App is : ~/nodejs
Login to SSH terminal
Login to the ssh sever with the following command ,
ssh myuser@nodejs.mydomain.com -p 22
Activate NodeJs Virtual Environment
Activate the Virtual Sandbox NodeJS environment for the domain nodejs.mydomain.com as follows,
myuser:$ ~ $ source ~/.sandbox/nodejs/nodejs.mydomain.com/bin/activate
(nodejs.mydomain.com) myuser:$ ~ $
Done, you are on the domains NodeJs environment , you can start working on your NodeJS app from the terminal
See some example command below,
Go to app document root , list NPMs and check nodejs version
(nodejs.mydomain.com) myuser@:$ ~ $ cd nodejs/
(nodejs.mydomain.com) myuser:$ ~/nodejs $ npm list
nodejs@ /home/myuser/nodejs
├── async@3.2.3
├── express@4.17.3
├── list@2.0.19
├── lodash@4.17.21
├── rxjs@7.5.5
└── yes@1.1.1
(nodejs.mydomain.com) myuser:$ ~/nodejs $node -v
v16.13.0
Deactivate NdoeJs Virtual Environment
You can deactivate the current working NodeJs shell virtual environment use the following command,
(ndoejs.mydomain.com) myuser@:$ ~ $ deactivate
myuser@:$ ~ $
Switch NodeJs SandBox Virtual Environment
Let us say we have another NodeJs app on the domain chat.mydomain.com on the same same eenos hosting account, we can switch to the virtual environment for the chat app as follows,
myuser:$ ~ $ source ~/.sandbox/nodejs/chat.mydomain.com/bin/activate
(chat.mydomain.com) myuser:$ ~ $
With the above steps you can start deploying NodeJs apps. The next session will help you to manage NodeJS NPM modules from the eenos control panel