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

[docs] Example of how to use Koa's ctx.state within a vue #321

Open
renoirb opened this issue Apr 19, 2018 · 2 comments
Open

[docs] Example of how to use Koa's ctx.state within a vue #321

renoirb opened this issue Apr 19, 2018 · 2 comments

Comments

@renoirb
Copy link
Collaborator

renoirb commented Apr 19, 2018

Or rather some more notes about how to make Koa/Nuxt collaborate outside of using an HTTP axios request.

I see we can use ctx.session and use have it passed back when we do this.$axios from a page asyncData/fetch method.

But mostly this is about hinting and/or leaving notes to show how one thing is done (or called) in this stack

  • "Flash" messages... to client side from a Koa route
  • How to send log messages (ctx.log.info from a router?)
  • how one route is protected compared to another
  • How is this different from using Nuxt's serverMiddleware
  • a model implementation sample, can be a plain js object like I've done for translation
  • finish up examples written in TypeScript with full async/await implementation and full use of Vuex
  • What else...?
This question is available on Nuxt.js community (#c4)
@renoirb
Copy link
Collaborator Author

renoirb commented Apr 20, 2018

I'm going to bring up a PR from things I've worked on in the last days, it should help with some more examples and patterns.

I first need to assemble notes and rebase work before making a PR, some work done is related to this

@renoirb
Copy link
Collaborator Author

renoirb commented Sep 7, 2018

Hey @clarkdo, FYI, I'm experimenting refactoring Hare with Nuxt edge, Vue CLI v3.

In relation to Koa, (and other modules a project might want), I wonder if we could leverage yarn workspaces/lerna and split this monolith a bit.

If we could have a chat, I'd like to exchange with you directions you had in mind so I can donsomething useful.

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

2 participants