Skip to content

@Acconut /gist:5383324
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Hoodie on Windows and Linux

Hoodie on Windows and Linux

This guide will help you to use hoodie on windows and linux.

Before we start you'll need following dependencies installed:

  • node
  • npm
  • git
  • couchdb

First you need to set some environment variables. To do that find your couchdb installation directory (e.g. D:\AwesomeStuff\CouchDB). After that add those two variables (where PATH is your couchdb installation directory):

  • COUCH_BIN: PATH/bin/bin
  • COUCH_DEFAULT_INI:PATH/etc/couchdb/default.ini

Then you need to install local-tld.

[sudo] npm install -g git://github.com/mdlawson/local-tld.git#crossplatform

Then we need the hoodie cli.

[sudo] npm install -g hoodie-cli

Now we can create our app (myhoodieapp is our app's name):

hoodie new myhoodieapp

After that you'll need to start the local-tld server (as admin).

[sudo] local-tld start

Now you're ready to rumble and run hoodie. Go to your hoodie installtion folder (myhoodieapp) and start it:

hoodie start

You'll maybe asked for a password. Just enter one and remember it!

So now you're hoodie app should be set up and you can try it at myhoodieapp.dev. Enjoy!

Tons of thanks to mdlawson!

Last update: 07/13/2013 (1373746028208)

Todo

  • local-tld for windows
  • node-multicouch for windows (to be merged)
  • hoodie cli in node.js
@jbeard4

npm install -g git://github.com/Acconut/local-tld.git#crossplatform fails with the following error on Ubuntu 12.04:

jacob@jacob-ThinkPad-W520:~$ npm install -g git://github.com/Acconut/local-tld.git#crossplatform
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: local-tld@3.0.5
npm ERR! notsup Valid OS:    darwin,win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! System Linux 3.2.0-38-generic
npm ERR! command "/home/jacob/.nvm/v0.8.23/bin/node" "/home/jacob/.nvm/v0.8.23/bin/npm" "install" "-g" "git://github.com/Acconut/local-tld.git#crossplatform"
npm ERR! cwd /home/jacob
npm ERR! node -v v0.8.23
npm ERR! npm -v 1.2.18
npm ERR! code EBADPLATFORM
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/jacob/npm-debug.log

It looks like it's not supported on Linux, so the instructions should probably be amended to note this.

@jbeard4

hoodie new myhoodieapp mdlawson/my-first-hoodie fails with the following error on Ubuntu 12.04:

npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/jacob/tmp/myhoodieapp/npm-debug.log
npm ERR! not ok code 0

npm log reveals the following output:

16071 error error rolling back Error: ENOTEMPTY, rmdir '/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app'
16071 error error rolling back  hoodie-app@0.5.0 { [Error: ENOTEMPTY, rmdir '/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app']
16071 error error rolling back   errno: 53,
16071 error error rolling back   code: 'ENOTEMPTY',
16071 error error rolling back   path: '/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app' }
16072 error notsup Unsupported
16072 error notsup Not compatible with your operating system or architecture: local-tld@3.0.5
16072 error notsup Valid OS:    darwin,win32
16072 error notsup Valid Arch:  any
16072 error notsup Actual OS:   linux
16072 error notsup Actual Arch: x64
16073 error System Linux 3.2.0-38-generic
16074 error command "/home/jacob/.nvm/v0.8.23/bin/node" "/home/jacob/.nvm/v0.8.23/bin/npm" "install"
16075 error cwd /home/jacob/tmp/myhoodieapp
16076 error node -v v0.8.23
16077 error npm -v 1.2.18
16078 error code EBADPLATFORM
16079 verbose exit [ 1, true ]

Seems to be related to the above problem.

I guess Linux is currently not supported?

@ivarni

I've got it working on 12.10. I asked about local-tld on twitter (https://twitter.com/caolan/status/338270524977340417) and it's apparently not required. I can access the app fine on http://localhost:8080/

I realize this probably doesn't help with your second error, but it indicates that's it's not related to the first.

@Acconut
Owner

@jbeard4: @mdlawson said Linux/Ubuntu is supported. We just forgot to update the package.json. Sorry about that.

@jbeard4

hoodie new myhoodieapp mdlawson/my-first-hoodie now succeeds on Ubuntu, but hoodie start fails with the following error:

jacob@jacob-ThinkPad-W520:~/tmp/myhoodieapp$ hoodie start

> myhoodieapp@1.0.0 start /home/jacob/tmp/myhoodieapp
> node node_modules/hoodie-app/bin/start


.d$b.  .d$b.  .d$$$$$$b.    .d$$$$$$b.  .d$$$$$$b.  .d$b..d$$$$$$$$b.
$$$$$..$$$$$.$$$$$$$$$$$b .$$$$$$$$$$$b $$$$$$$$$$b $$$$$$$$$$$$$$$P'
$$$$$$$$$$$$d$$$$$$$$$$$$bd$$$$$$$$$$$$b$$$$$$$$$$$b$$$$$$$$$$$$$$$b.
$$$$$$$$$$$$Q$$$$$$$$$$$$PQ$$$$$$$$$$$$P$$$$$$$$$$$P$$$$$$$$$$$$$$$P'
$$$$$´`$$$$$'$$$$$$$$$$$$''$$$$$$$$$$$$'$$$$$$$$$$P $$$$$$$$$$$$$$$b.
'Q$P'  'Q$P'  'Q$$$$$$P'    'Q$$$$$$P'  'Q$$$$$$$P  'Q$P''Q$$$$$$$$P'

 Hi!


/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app/node_modules/local-tld/lib/servicemanager.js:84
    throw new Error("Not implemented");
          ^
Error: Not implemented
    at Object.<anonymous> (/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app/node_modules/local-tld/lib/servicemanager.js:84:11)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/jacob/tmp/myhoodieapp/node_modules/hoodie-app/node_modules/local-tld/lib/local-tld.js:1:77)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
npm ERR! myhoodieapp@1.0.0 start: `node node_modules/hoodie-app/bin/start`
npm ERR! `sh "-c" "node node_modules/hoodie-app/bin/start"` failed with 1
npm ERR! 
npm ERR! Failed at the myhoodieapp@1.0.0 start script.
npm ERR! This is most likely a problem with the myhoodieapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/hoodie-app/bin/start
npm ERR! You can get their info via:
npm ERR!     npm owner ls myhoodieapp
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-38-generic
npm ERR! command "/home/jacob/.nvm/v0.8.23/bin/node" "/home/jacob/.nvm/v0.8.23/bin/npm" "start"
npm ERR! cwd /home/jacob/tmp/myhoodieapp
npm ERR! node -v v0.8.23
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/jacob/tmp/myhoodieapp/npm-debug.log
npm ERR! not ok code 0

It looks like it's trying to start local-tld, and failing because local-tld is not implemented on Linux.

@Acconut @mdlawson am I missing something? Thanks.

@mdlawson

hopefully fixed with mdlawson/local-tld@42bd4d6

@Acconut
Owner

@jbeard4 You need to install the latest version of local-tld, obviously:
npm install -g git://github.com/mdlawson/local-tld.git#crossplatform

@omrqs

You are need type command as root (sudo).

I Got It! Good Luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.