A good bookshelf.js tutorial?

Hi there,

I started using strapi a couple of weeks ago. I noticed that the default queries don’t always fulfill my needs and I have to create some custom endpoints. However, I can’t get my head around Bookshelf.js, I find the documentation complex and disordinate thus I ended up using knex directly but it seems a bit ‘dirty’ to me, if that makes sense.

I can’t find a good bookshelf tutorial online. Any suggestions?

That one was pretty informative for me:
http://zetcode.com/javascript/bookshelf/

Also the best “tutorial” is actually the Github issues. Search there in closed issues.

3 Likes

I can totally feel your pain there, I’ve added some notes into our internal documentation “to-do” list on providing some good examples using some custom bookshelf queries.

3 Likes

Sorry, but I don’t really agree. GitHub issues are there because they are “issues”, they have nothing to do with learning and understanding the use of a framework (or an orm in this case)…

Yeah, I know, but since the bookshelf doesn’t have some good/complete tutorials with great examples, I’ve used GitHub (it’s actually not only for issues). There is actually a lot of useful information/explanations about how things do work in bookshelf.

Also, check the bookshelf source files you find out that there everything is well commented and they provide examples directly in commentaries.

You will notice that more than 75% of its code are just explanations and examples for each function.

3 Likes