-
-
Save AaronTrazona/2723558 to your computer and use it in GitHub Desktop.
How I got node.couchdb.js working on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Set up workspace | |
mkdir \work\node_modules | |
cd \work\node_modules | |
REM check out modules | |
cmd /c git clone https://github.com/mikeal/node.couchapp.js.git couchapp | |
cmd /c git clone https://github.com/mikeal/request.git | |
cmd /c git clone https://github.com/mikeal/watch.git | |
REM create my_app | |
mkdir \work\my_app | |
cd \work\my_app | |
REM skeleton couchapp in .\node_modules | |
mkdir node_modules | |
echo var couchapp=require("couchapp");>node_modules\app.js | |
echo var ddoc={_id: "_design/app"};>>node_modules\app.js | |
echo module.exports=ddoc;>>node_modules\app.js | |
REM get working copy of the couchapp command | |
copy \work\node_modules\couchapp\bin.js . | |
sed s/.\/main.js/couchapp/ bin.js > couchapp.js | |
del bin.js | |
REM Ready to go! | |
REM set cred=rsbohn:secret | |
REM curl -XPUT http://%cred%@localhost:5984/seed | |
REM node.exe couchapp.js push app http://%cred%@localhost:5984/seed | |
REM curl http://localhost:5984/seed/_design/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment