Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗄🔧 Koa.js(Node.js) + knex(SQL) #49

Closed
5 tasks done
dimonnwc3 opened this issue Apr 25, 2017 · 22 comments
Closed
5 tasks done

🗄🔧 Koa.js(Node.js) + knex(SQL) #49

dimonnwc3 opened this issue Apr 25, 2017 · 22 comments

Comments

@dimonnwc3
Copy link

dimonnwc3 commented Apr 25, 2017

Current Status

Todo:

  • 🏁 Fork the starter repo & post the link in this issue
  • 🎨 Create logo for repo & update issue status (@EricSimons)
  • 🔨 Implement all of Conduit's functionality per the spec & API
  • 👀 Move repo to main org & Peer review final codebase by admins/community (RFC)
  • 🎉 Tag v1 release and officially list it on the README!

@EricSimons
Copy link
Member

Awesome! Just updated the issue status, created a gitter room for us to manage collaborator coordination, and created the logo for your repo's readme 👍:

koa2

@EricSimons EricSimons changed the title Koa.js(Node.js) + knex(SQL) 🗄🔧 Koa.js(Node.js) + knex(SQL) Apr 25, 2017
@dimonnwc3
Copy link
Author

@EricSimons first version is here, could you check it, please?

@EricSimons
Copy link
Member

@dimonnwc3 awesome!! Checking it out now 👍

@EricSimons
Copy link
Member

@apai4 can you take a peek at this too?

@EricSimons
Copy link
Member

@dimonnwc3 what version of node are you using for it? I'm getting errors due to async/await not being supported :(

@dimonnwc3
Copy link
Author

@EricSimons I use latest stable version 7.10
you can follow this guide to run the app: https://github.com/dimonnwc3/node-koa-realworld-starter-kit#getting-started

@EricSimons
Copy link
Member

Got it working! Found a bug — when adding a new comment, the server response upon creation attaches the article's author instead of the comment author. I'm thinking that maybe it's this line? https://github.com/dimonnwc3/node-koa-realworld-starter-kit/blob/master/src/controllers/comments-controller.js#L73

@dimonnwc3
Copy link
Author

thanks, you are right. I fixed it

@EricSimons EricSimons added rfc and removed wip labels May 3, 2017
@EricSimons
Copy link
Member

Looks good!

@tj @jonathanong would either of you (or someone else in the Koa community) be able to provide a quick 👍 or 👎 on this codebase before we mark it 1.0? 🙏

@EricSimons
Copy link
Member

Status update: Still trying to get a hold of anyone in the Koa community who can look this codebase over. I posted an issue over in the Koa repo as well.

@dimonnwc3 any chance you know some folks in the Koa community who could help review here? :)

@dimonnwc3
Copy link
Author

@EricSimons it's very similar to express/connect but uses promises out of the box to building simple middleware

actually, I switched from express to koa for a long time and can do a review, but not for himself :-)

so people from the express world could do it as well, but they need good knowledge about new ES features like promises and async-await

Another point is working with a database. Knex is a just query builder and there is no ORM or some relation management, so I have to write queries manually.

For the first version, I implemented functionality with logical joins on the application level.
In future, I will try to do some optimizations and move possible joins to DB level to increasing the performance.

So review, some suggestions, and contributions for this part would be great as well :)

@EricSimons
Copy link
Member

@dimonnwc3 awesome! If no one from the Koa community jumps in here within the next day or two, I'm just going to approve it & list on the readme :)

@dimonnwc3
Copy link
Author

@EricSimons ok it's cool, I'm already done some optimization tasks. So, it should have better performance now :)

@sonicoder86
Copy link

@EricSimons Is there space for koa + mongo next to this example?

@dimonnwc3
Copy link
Author

@EricSimons ping you to don't forget about this repo :)

@EricSimons
Copy link
Member

@BlackSonic of course! Perhaps you could fork this repo and swap out knex for mongo?

@dimonnwc3 I didn't! :) Spinning up a repo now under the main org

@EricSimons
Copy link
Member

@dimonnwc3 just added you to https://github.com/gothinkster/koa-knex-realworld-example — going to list this on the main readme in a few minutes, awesome work!! 💪🎉

@dimonnwc3
Copy link
Author

@EricSimons great 👍

@EricSimons
Copy link
Member

Added! Closing this issue; future bugs/questions/etc should be posted in the repo itself: https://github.com/gothinkster/koa-knex-realworld-example

@sonicoder86
Copy link

@EricSimons I would rather start from scratch, narrow it down and copy parts, this Koa + Knex example feels bit too complicated for me as a learning repository.

@EricSimons
Copy link
Member

That's totally fine as well — go ahead and create a new issue for Koa + Mongo, fork the starter kit, and I'll update the issue's status :)

@ppot
Copy link

ppot commented Jun 17, 2017

Thanks! That's what I needed to understand async/await with Koa and Knex!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants