Comments (22)
Thanks! That's what I needed to understand async/await
with Koa and Knex!
from realworld.
@EricSimons first version is here, could you check it, please?
from realworld.
@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 :)
from realworld.
@apai4 can you take a peek at this too?
from realworld.
@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
from realworld.
thanks, you are right. I fixed it
from realworld.
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 👍:
from realworld.
@dimonnwc3 awesome!! Checking it out now 👍
from realworld.
@dimonnwc3 what version of node are you using for it? I'm getting errors due to async/await not being supported :(
from realworld.
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
from realworld.
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? 🙏
from realworld.
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? :)
from realworld.
@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 :)
from realworld.
@EricSimons ok it's cool, I'm already done some optimization tasks. So, it should have better performance now :)
from realworld.
@EricSimons Is there space for koa + mongo next to this example?
from realworld.
@EricSimons ping you to don't forget about this repo :)
from realworld.
@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
from realworld.
@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!! 💪🎉
from realworld.
@EricSimons great 👍
from realworld.
Added! Closing this issue; future bugs/questions/etc should be posted in the repo itself: https://github.com/gothinkster/koa-knex-realworld-example
from realworld.
@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.
from realworld.
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 :)
from realworld.
Related Issues (20)
- [Bug]: Line breaks not showing correctly HOT 1
- [Bug]: Immediately signed out after logging in HOT 3
- [Backend] Remove Response Envelopes HOT 5
- [Bug]: When try to build HOT 5
- User registration success status code is 200, but docs/swagger show 201 HOT 1
- [Bug]: server ERROR 500 HOT 2
- [Bug]: CORS Error HOT 9
- [Feature Request]: offline functionality HOT 2
- [Bug]: Demo server status is 503 HOT 1
- [Feature Request]: Vuetify in Realworld example HOT 1
- [Bug]: Continuous modification of user information results in an error HOT 4
- Try this HOT 1
- [Bug]: demo APIs down? HOT 2
- [Bug] initialData.data from route loader is always undefined HOT 1
- API server doesn't work HOT 1
- [Bug]: Heroku Deployment failed
- [Bug]: API doesn't work HOT 4
- [Bug]:CORS Issue HOT 1
- [Bug]: Demo backend is down HOT 2
- [Bug]: Site Not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realworld.