Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added Linux run script

  • Loading branch information...
commit 9bfdf9db5ebc6f93a24ea334fd99ad655bd73e4c 1 parent 7ff2651
@desunit desunit authored
Showing with 40 additions and 0 deletions.
  1. +2 −0  NodeStackProxy/install
  2. +38 −0 NodeStackProxy/run
View
2  NodeStackProxy/install
@@ -2,11 +2,13 @@
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
+# install npm
git clone git://github.com/isaacs/npm.git
cd npm/scripts
chmod +x install.sh
sudo ./install.sh
+# install node
git clone git://github.com/ry/node.git
cd node
./configure
View
38 NodeStackProxy/run
@@ -0,0 +1,38 @@
+#!/bin/bash
+MONO_PREFIX=/opt/mono-2.11
+export MONO_PATH=$MONO_PREFIX/lib
+export PATH=$MONO_PREFIX/bin:$PATH
+export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig
+export LD_LIBRARY_PATH=$MONO_PREFIX/lib
+export MONO_LOG_LEVEL=error
+
+DIR=`cd "$(dirname "$0")"; pwd`
+SERVICE_WORKINGDIR=`cd ${DIR}/Service/bin/Release/; pwd`
+
+# compile
+$MONO_PREFIX/bin/xbuild Service/Service.sln /p:Configuration=Release /flp:LogFile=msbuild.log
+
+# stop service if needed
+if [ -f ${SLOCK} ];
+then
+ echo Sopping Service...
+ SLOCK=/tmp/service.lock
+ SPID=`cat ${SLOCK}`
+ while [ -f ${SLOCK} ] && kill ${SPID}; do
+ sleep 0.5
+ done
+ if [ -f ${SLOCK} ];
+ then
+ rm -f ${SLOCK}
+ fi
+fi
+
+#$MONO_PREFIX/bin/mono Service/bin/Release/Service.exe
+
+# run service using port 8090
+$MONO_PREFIX/bin/mono-service -m:service -d:${SERVICE_WORKINGDIR} -l:${SLOCK} ${SERVICE_WORKINGDIR}/Service.exe
+
+# run site using port 8080
+cd Site
+npm link
+npm start
Please sign in to comment.
Something went wrong with that request. Please try again.