The Problem: You need to get the client IP address in the Cloud Code for Geolocation or similar purposes? It used to be more complicated, now we can just use the request headers as the update below describes. Update 2017-10-10 There seems to be a fix in Parse server that allows us to read the headers without this workaround. If you have a recent version of Parse server, you should be able to simply access the visitor IP through x-forwarded-for request header.

Continue reading

Private bitbucket repository as npm dependency In a way that it still works in your choice of Continuous Integration tools. The Hard Way By using BitBucket’s SSH deployment keys. Tom Spencer has written a great post about this and I’ve used his method succesfully. There’s nothing wrong his this approach, I just found it very complicated (for my specific use case) because it requires generating SSH keys, setting them up in BitBucket, and adding extra scripts in your dependant project that set up the SSH keys in the build environment before it can execute npm install.

Continue reading

Once there was a naïve Mongoose user who tried to run a Mongoose .find() over a whole collection and do operations on all of the documents found there. OK, maybe it was me, this morning. First approach It was something like this: SomeModel .find({}) .populate('someReferences') .exec(function(err, doc) { doStuff(doc); }); Can you guess what happened after that script churned on the collection for a while? Crash! This happened, node.

Continue reading

Ghost is a blogging platform. Absurd Tech runs Ghost in a FreeBSD AWS EC2 instance. The usual steps to deploy include: 1. download ghost, 2. unzip it and 3. run npm install in the ghost dir: $ curl -O https://ghost.org/zip/ghost-0.7.8.zip $ unzip ghost-0.7.8.zip $ cd ghost-0.7.8 $ npm install $ npm start --production Not that easy for us FreeBSD’ers. Especially if you have a somewhat recent version of FreeBSD and its packages.

Continue reading

So, I’m coding happily, when I hear one of the guys in the office say: “Samurai, the backend crashed when I opened the iOS app.” This doesn’t sound good. Happiness has fled. I open a terminal window, press Ctrl+R, start to type hero and then my bash shell gives me this command from history (that I never otherwise remember): heroku logs --app OurAppName -t -n 5000: The dramatic claim of backend busted was not false.

Continue reading

Author's picture

Absurd Tech

Another Coder Blog

Fullstack

Europe