site
site copied to clipboard
Add Nuxt and Angular quickstart guides
This pr adds QuickStart guides for Angular and Nuxt
@ryanto fixed all the typos ;)
I used angular in the way @danielgek explained and it works perfectly! Thanks!!
Thanks for getting started on this. I've noticied there is some problems using Mirage with Nuxt.js in SSR mode, after @danielgek (Thank you!) helped me adding it to Nuxt in the first place.
And my solution was after creating a plugin and specifying it to work only in development mode, I wrapped my server in one function and created a global middleware to call the server each time a page gets reloaded.
I re-created Mirage vue-demo in Universal mode, and added my process in the description : https://github.com/adhamfarrag/miragenuxtdemo
Yeah don't merge this, i want to add the middleware approach to the docs, Thanks @adhamfarrag
Ok great, happy to wait until you say so @danielgek
If you want to split up the Angular and Nuxt parts into two PRs I'd be happy to merge the angular one if you think it's ready now.
@danielgek thanks for your work on this, myself I have spent some hours trying to figure out how to have MirageJs working on an angular setup (NX monorepo).
Do you agree that this covers mostly the development use case but not the testing one e.g.(if you want to have e2e with Cypress)?
I would be happy to help to document this as part of this PR if you think it's a good idea.
Hey @danielquintero more than happy for it to document that part !! i don't have time rn to test and experiment with this, so and per recommendation of @ryanto it would be great if you can go into a different PR 😉
If you want to talk about the docs ping me on discord ;)
@adhamfarrag looks like your example is gone, did you happen to move it to a sandbox or anything? I'm trying the plugin approach and Mirage errors saying it can't see my routes.
@chuckcarpenter are you having trouble with Angular or with Nuxt?
@danielquintero, if you could share a repo with Angular working, I have time to help get it into a proper Quickstart guide + run through and test it myself! We should definitely have an Angular Quickstart up by now, I'm a little embarrassed we don't because I know several folks who are using it 😅
@chuckcarpenter are you having trouble with Angular or with Nuxt?
@danielquintero, if you could share a repo with Angular working, I have time to help get it into a proper Quickstart guide + run through and test it myself! We should definitely have an Angular Quickstart up by now, I'm a little embarrassed we don't because I know several folks who are using it 😅
@samselikoff I am a bit busy with regular work today, but let me help out this weekend. I will create the repo and we can take it from there, sounds good?
Yep no rush, I am going to try to take work off this weekend but drop it here and I'll look at it next!
Been clearing some work off my plate so I can get back on top of GH issues. We're pretty focused here on fixing all these bugs + tying up loose ends so we can ship a 1.0!
@samselikoff @danielgek
hey guys I finally had some time to put together a repo with a working example using Angular(Nx) and Cypress, take a look and let me know if that helps and if I can help documenting it somehow.
https://github.com/danielquintero/nx-angular-mirage
I think we should start an examples
directory somewhere, just like Next.js does it, so we can have these as living examples and make it easier for us to figure out the right way to get people set up here.
@ryanto and others, what do you all think? We could either copy Next.js here and add /examples
to miragejs
repo itself, or start a new repo miragejs/examples
and keep all the examples there. (We already have some repos like miragejs/vue-demo
but I think we should consolidate all examples into a single spot.)
Would someone like to take lead on this and add an Angular or Nuxt example there?
Hello, just wondering if the guide for Angular is still being maintained anywhere?