Install latest LTS version of NodeJS .
NVM is an easy way to setup nodejs on linux machines.
- To install NVM, run command
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- Above command will add nvm to the
.bashrc
file. Reload.bashrc
soruce ~/.bashrc
- Now NVM command should be available. To install latest version of NodeJS, run command
nvm install --lts
- Verify node and npm versions.
node -v
This should output node version, for ex.v10.14.0
npm -v
This should output npm version, for ex6.4.1
- Nodejs installation is complete.
-
Back end code is hosted at our bitbucket git server. starup-assist . I have send access invitation to your email but in case you dont want to go through another account setup process, here is the direct link for code download.
https://www.dropbox.com/s/woeg25t46mccao7/startup-assist.zip?dl=0
Download source code from above link and unzip it. It should have the following structure.
-
Update the database config settings in the
config/config.json
file in case database credentials have changed. -
We are interested in staging section for now. Refer the screenshot below.
-
Update
usename
,password
,database
andhost
according to the RDS instance details. -
CD to the source code directory and run command
npm install
Above command will install the required dependencies for code.
New directory structure should look like
-
Notice the addition of a folder callednode_modules
, abovepackage.json
file. -
To run the backend server, execute command
npm run stag
or if you want it to persist after ssh session if closed, run it usingnohup
.
nohup npm run stag &
Above command should start our backend server on
port 3000
Make sure port 3000 is open in the security config if you want to test the backend server from your browser.