Posts

Showing posts with the label cloud

Instruction to Deploy Contract Test between NextJS and NestJS with Pact

Image
Introduction Contract Testing is an integration testing method focused on verifying the interaction between a Consumer (the service user) and a Provider (the service provider). Instead of testing the entire system, Contract Testing ensures that both parties adhere to a shared covenant (contract). Key benefits include: early detection of non-compatible errors between Frontend and Backend, reduction of dependency on complex staging environments and enabling API changes to be made more confidently without breaking the partner's application. Pact is currently the most popular Consumer-Driven Contract Testing tool. It allows the Consumer to define expectations regarding the response from the Provider and then packages these expectations into a JSON file (Pact file). Pact's advantages lie in supporting multiple languages, automatically generating documentation based on test cases and having robust integration capabilities into CI/CD pipelines to ensure the Provider always meets the C...

Guide to using NextJS Parallel and Intercepting Routes

Image
Introduction In the previous article I guided some ways to use NextJS App Router, now we will continue with 2 other features including Parallel Routes: as the name implies you can understand that it allows to define many separate routes and put them together on 1 route for display, the very clear advantage is that it helps to separate UI, isolate errors (if any), easy to maintain and expand functionality Note that if you use this feature and in the main route has define an additional 1 page that is not a Parallel Routes, then in the Parallel Routes should have an additional file to show default information to avoid 404 errors when accessing directly (we will go into more detail in the detail part below) Intercepting Route: Allows "blocking" a route to display that content in another context (for example: a link will display a Modal, but when reloading that page, a separate page will open). Prerequisites This article is continued to be developed from previous articles, please ...