Posts

Showing posts from December, 2017

How to install mongodb on an ubuntu EC2 instance

Follow these simple steps to set up mongodb into an ec2 ubuntu instance Import public key sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 Create a list file echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list sudo apt-get update sudo apt-get install -y mongodb-org Start a service  sudo service mongod star     **In my case: Job was already running Connect the mongo... :) mongo  Stop the service ..If you want. sudo service mongod stop

Deploy Angular4 application on an ec2 instance

Here are the some easy steps to deploy an angular4 application into an ec2 instance install angular-cli  sudo npm install -g @angular/cli node with version greater than 6 must be installed  see my last post describes to setup an node application Port should be open from security group inbound rules. Clone the repo:- Run:  npm install serve to required port and public ip   ng serve --disable-host-check --host 0.0.0.0 --port 3100  --public  xx.xx.xx.xxx Run in background  Start a client nohup ng serve --disable-host-check --host 0.0.0.0 --port 3100  --public  xx.xx.xx.xxx  1>./log.txt 2>./err.txt & Stop a client  kill $( lsof -t -i:3100) Or by using screen screen -S newSession  screen -r More detail over screen

How to publish an Node application on Ubuntu.

Image
Do you have a dream of seeing your nodeJS application running on a live server?   But all such dreams ended up in a nightmare because you don't know anything about how to use a remote machine? And the dream remains a dream throughout your lifetime. If so then I have my empathy for you because I had been sharing the same nightmare a few days ago ever since when a friend of mine made this simple and made me took a step ahead.  Let me make it  Prerequisites: Make sure you have a running remote machine in Ubuntu14.04, say EC2 instance. If you don't know how to set up a remote machine I promise I will help you up in my upcoming posts. You have an established connection to the remote machine. So that you can access your remote machine. You can use any client say Putty or directly the ssh command. Will surely post about this well. Here are some very simple bullets points to set up a node application: After you successfully connected to the remot...