-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Express with my nuxt app? #563
Comments
Is deprecated in version 3.0 Use nuxt-render https://nuxtjs.org/api/nuxt-render or serverMiddleware https://nuxtjs.org/api/configuration-servermiddleware |
Why was it deprecated? |
Server templates |
For anyone who doesn't want to drop their current workflow, you can just use the latest working version with this command: |
More time consuming to use Nuxt.... Where can we see the discussed various reasons about why removing the server template? I could not see the necessity of it... |
Hi. I can fully understand suddenly changing workflow that some users used to would be hard. We had to remove programmatic usage of Nuxt from CNA template because otherwise more and more users could wrongly choose this option which is not a good practice for most use cases because of several DX issues (like full server reload) and deployment (loading correct dist assets) also issues for ESM and typescript support. This doesn't mean we deprecated programmatic usage and it was even improved recently nuxt/nuxt#6868 (docs) and will be better in nuxt3 for first class serverless and custom server support but it is only recommended for advanced users that can handle all edge cases thus removed from CNA template. The current alternative recommended approach is using a serverMiddleware to use There are also custom backend templates: (maybe outdated)
Articles:
|
I'm having a lot of trouble connecting the dots with this documentation: https://nuxtjs.org/api/configuration-servermiddleware I don't see how that explains that now that the express option is removed how do I use the server middleware to create an express app that runs parallel to the Nuxt app? Is there a more in-depth tutorial for that process? |
I'm looking at this page as well: https://nuxtjs.org/api/nuxt-render And i'm not sure where to put that code for the express example, what file should that code go in? EDIT: For anyone having a lot of trouble with this new setup like I was I found this tutorial to be super helpful: |
Use command with old version and compare with new version. |
@jerosoler Ok, would be nice if they had a full example in the documentation, it's really vague |
@JordashTalon agreed |
@pi0 Thank you so much for the detailed update. Sorry if this has been answered elsewhere. |
@pi0 this documentation states that you must choose a back-end in order to host in Azure: Is that still the case? What should I be doing instead please? Thanks |
one-click-install It's what I want. If I can, it's "great again." |
@dan-hammond Docs is outdated unfortounatly. I know @f3ltron is working on an article for azure :) (spoiler) @ideacco @robbylucia Your demand is correct. Nuxt 3 would generate a server.js by default so it is zero click ;) Meanwhile you can use express-template which is properly configuring express api as a serverMiddleware. |
server.js by default? That's amazing. I look forward to it |
It wll take a bit of time but I am working on it as much as possible. It's already working now ii have to write a good article. but soon soon :). Thank's @pi0 |
I am having a headache trying to connect All I get is a HTTP/1.1 connection over SSL. This is really exhausting. |
Indeed, very exhausting! I was trying to migrate a vue-express SPA to SSR to end up with MPA that uses socket.io with Google APIs, stripe and peerjs, what a headache — I am keeping an open mind about Nuxt and the team's great work. |
how about koa-template, it hasn't been updated for 3 years. |
Man this is a stupid change. Removing a feature because you think we're too dumb to use it correctly. All it does is make using your platform more complicated, confusing and time consuming. For the life of me I cannot understand why this was possibly a good idea, and telling people to use an older version as a workaround... equally as frustrating and stupid. |
@JamesAlphonse Feel free Vue and vue-cli for more flexibility. Nuxt can be really confusing for advanced websites, especially if you don't need nuxt modules.. |
I noticed that I cannot specify my backend framework anymore, in this case I would like to use express. Is this just not possible anymore?
The text was updated successfully, but these errors were encountered: