Sunday, May 13, 2018

Running a spring boot service in Ubuntu 16.4

$ sudo useradd bdesilva
$ sudo passwd bdesilva
$ sudo chown bdesilva:bdesilva your-app.jar
$ sudo chmod 500 your-app.jar

sudo ln -s /path/to/your-app.jar /etc/init.d/your-app

/etc/systemd/system /your-app.service

[Unit]
Description=A Spring Boot application
After=syslog.target
 
[Service]
User=bdesilva
WorkingDirectory=/usr/src/hackfreeapps
ExecStart=/usr/bin/java -jar executable.jar
SuccessExitStatus=143
 
[Install]
WantedBy=multi-user.target

Monday, March 19, 2018

Starting React Project

npm install -g create-react-app

 create-react-app my-app


 cd my-app
> npm start 


To Build React for Production use:
> npm run build


> npm install -g serve
> serve -s build


Adding other packages

npm install --save redux
npm install --save react-redux
npm install --save react-router-dom
npm install --save redux-thunk

Adding SAAS
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc

Wednesday, July 20, 2016

Adding MySQL to startup in ubuntu

 sudo update-rc.d mysql defaults

openshift postgres connectivity with pgadmin

run this command to get the
rhc port-forward -a applicationName
to get the host, port and username


in the ssql tunnel tab 

set the identify file in user/.ssh/id_rsa.file
Tunnel-Host would be your applications name with the .com
Username the beginning string, when ssh'ing to that connection: XXX@application-name
Identity file would be id_rsa in .ssh fodler in your home directory
password your openshift password
thats it!

openshift postgres connectivity with pgadmin

run this command to get the
rhc port-forward -a applicationName
to get the host, port and username


in the ssql tunnel tab 

set the identify file in user/.ssh/id_rsa.file
Tunnel-Host would be your applications name with the .com
Username the beginning string, when ssh'ing to that connection: XXX@application-name
Identity file would be id_rsa in .ssh fodler in your home directory
password your openshift password
thats it!

Friday, January 23, 2015

JAVA_HOME to .profile

sudo gedit /home/byorn/.profile

export JAVA_HOME="/home/byorn/Programs/jdk1.8.0_31"
export PATH="$JAVA_HOME/bin:$PATH"