You'd want to ensure that you are correctly setting the emulator environment variables with
$(gcloud beta emulators datastore env-init) after starting it
according to the docs, however even when I do that the bookshelf sample app crashes for me after writing one entity. It looks like the sample app doesn't work with the emulator at this time (note that nowhere in the tutorial does it actually mention that it does).
The tutorial itself is in need of an update in any case, as you see from the
list of open issues on its GitHub page. I also needed to manually update the dependencies to get
npm install to even work.