humanscripting with nodesk (part 1: getting off ground)..

ok, the time has come, finally.. let's get nodesk up and running and start humanscripting again..

step 1: hm.. I want to create an app on heroku and link it to the current nodesk repo.. I'm not sure exactly what "heroku create" does.. hm.. let's backup everything in nodesk, clear it out, and try running "heroku create"..

hm.. seems to have create an app ok.. now I want to name this one "nodesk", let's try renaming it on heroku.. actually, let's see if there's a command-line for that.. yup: heroku apps:rename newname..

ok, I got http://nodesk.herokuapp.com, sweet..

now let's put a skeleton app up there..

ok, we'll copy from nar-nar, since that's the most recent project..

ok, "hello world" version is up..

now I'm thinking I want to merge nodeutil.js and u.js.. hm.. that actually seems like something I should humanscript later..

ugg.. I tried upgrading node with brew, but apparently I didn't install it with brew, so I tried installing it with brew, but it is caught in some intermediate state where I can't run the old node or the new node.. I'm nodeless! nodeless... nodeless...

I'm back! noded. just needed to delete some files it was complaining about.. hopefully unnecessary files..

ok.. let's get login working..

hm.. I just noticed that the following code in login.js...

db.collection('users').update({ _id : user._id }, { $set : _.omit(user, '_id') }, { upsert: true }, function (err) {
    if (err) return done(err)
    done(null, user)

...was missing the err, so err was referring to the error in the enclosing function. I think I'll fix this in nodesk's version of login.js, but I don't want to endanger the running apps like nar-nar and february-fire by "fixing" this in them, since it's more likely to introduce problems than prevent them..

ugg.. login isn't working: 500 failed to obtain request token (status: 401 data: � sK��IMQ(�W(K��LI,IU�O,-�P(�L�K,)-JUH� �g�� ���,)

things that are different:
- I'm using a different odesk api key and secret
- I'm potentially using a different version of passport

I guess I could try with the old keys..
..the old keys work. So I guess the keys are the issue..

..ahh, right, I set my "nodesk" odesk app to use the non-oauth authentication.. I guess I should re-create it..

ok, login working :)

now the first thing I want is the ability to post a job.. hm.. I'm tired.. let's take a break for a bit..

No comments:

Post a Comment