site icon indicating copy to clipboard operation
site copied to clipboard

Add Nuxt and Angular quickstart guides

Open danielgek opened this issue 5 years ago • 14 comments

This pr adds QuickStart guides for Angular and Nuxt

danielgek avatar Jan 21 '20 19:01 danielgek

@ryanto fixed all the typos ;)

danielgek avatar Jan 22 '20 09:01 danielgek

I used angular in the way @danielgek explained and it works perfectly! Thanks!!

danieltolmon avatar Jan 23 '20 11:01 danieltolmon

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

adhamfarrag avatar Jan 23 '20 13:01 adhamfarrag

Yeah don't merge this, i want to add the middleware approach to the docs, Thanks @adhamfarrag

danielgek avatar Jan 23 '20 13:01 danielgek

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.

ryanto avatar Jan 23 '20 19:01 ryanto

@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.

danielquintero avatar Jun 22 '20 20:06 danielquintero

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 ;)

danielgek avatar Jun 23 '20 21:06 danielgek

@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 avatar Jul 01 '20 23:07 chuckcarpenter

@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 avatar Jul 03 '20 09:07 samselikoff

@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?

danielquintero avatar Jul 03 '20 10:07 danielquintero

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 avatar Jul 03 '20 10:07 samselikoff

@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

danielquintero avatar Jul 12 '20 11:07 danielquintero

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?

samselikoff avatar Sep 14 '20 16:09 samselikoff

Hello, just wondering if the guide for Angular is still being maintained anywhere?

ccczy-czy avatar Mar 11 '24 08:03 ccczy-czy