• Clone the project • Import project in your IDE as Maven project • Run command mvn clean package
Run .jar file
• Download latest .jar from releases section • Execute jar on Windows or Linux with administrative rights • Enter localhost:4000 and set up application
is_exist(){ pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}'` # if progress is exist then return 1,else return 0 if [ -z "${pid}" ]; then return 1 else return 0 fi }
start(){ is_exist if [ $? -eq 0 ]; then echo"${APP_NAME} is already running. pid=${pid}" else nohup java ${JVM} -jar ./${APP_NAME}${ARGS} > ${LOG_FILE} 2>&1 & echo"${APP_NAME} is start successfully, use 'log' option to print more info." fi }
stop(){ is_exist if [ $? -eq "0" ]; then kill -9 $pid echo"${APP_NAME} is stoped" else echo"${APP_NAME} is not running" fi }
status(){ is_exist if [ $? -eq "0" ]; then echo"${APP_NAME} is running. Pid is ${pid}" else echo"${APP_NAME} is NOT running." fi }
restart(){ stop sleep 2 start }
log(){ tail -n 100 -f server.log }
case"$1"in "start") start ;; "stop") stop ;; "status") status ;; "restart") restart ;; "log") log ;; *) help ;; esac