Przeglądaj źródła

Initial commit of koa files

Edward Bramanti 10 lat temu
rodzic
commit
4072db3502

+ 0 - 0
frameworks/JavaScript/koa/README.md


+ 3 - 0
frameworks/JavaScript/koa/bash_profile.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+export NODE_HOME=${IROOT}/node-v0.12.0-linux-x64

+ 0 - 0
frameworks/JavaScript/koa/benchmark_config


+ 0 - 0
frameworks/JavaScript/koa/install.sh


+ 0 - 0
frameworks/JavaScript/koa/package.json


+ 19 - 0
frameworks/JavaScript/koa/setup.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+sed -i 's|mongodb//.*/hello_world|mongodb//'"${DBHOST}"'/hello_world|g' hello.js
+
+export NODE_ENV=production
+export NODE_HOME=${IROOT}/node-v0.12.0-linux-x64
+export PATH=$PATH:$NODE_HOME/bin
+
+${NODE_HOME}/bin/npm install
+${NODE_HOME}/bin/node app.js &
+
+# !DO NOT REMOVE!
+#
+# It takes `node app` a few seconds to turn on and 
+# then fork. If you remove this sleep, the parent shell 
+# executing this script will be terminated before the 
+# application has time to awaken and be forked, and 
+# express will fail to be started
+sleep 5

+ 0 - 0
frameworks/JavaScript/koa/source_code