Host mailing preview on Next.js API route #345
umar-ahmed
started this conversation in
Ideas
Replies: 1 comment 16 replies
-
Hey @umar-ahmed I definitely like this idea as it might make it easier for some people to deploy. However, it seems kind of hard to implement. For example, I was not able to figure out a nice way to read the filesystem from a next API route so the next app actually runs embedded in a vanilla node server when you're in development mode and that process packages up the emails directory to pass it to the next app in |
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see that Mailing.run is already built on top of Next.js. I was wondering if there is any interest in allowing projects to integrate the preview server in an existing Next.js project using API routes?
Example:
The benefit of directly integrating is mostly for DX:
next dev
The main disadvantage I can see is that if Mailing.run decides to switch away for Next.js or not tie itself to any one framework, it might be harder to implement future features.
Let me know what you guys think!
Beta Was this translation helpful? Give feedback.
All reactions