简体   繁体   中英

Next.js - It is possible to make an app with next.js and an another server for backend application and be always good for SEO performances?

All is in the title:

It is possible to make an app with Next.js coupled to an another server for backend application and be always good for SEO performances ?

I'm trying to build an app with socket.io in Next.js. Seems I got to build an another server specifically for socket.io. By the same way Iwill use this server to handle databases requests and all.

I wonder if it always great for SEO performance to do that ? I mean, if SEO is good since my UI content will appear to crawler thanks to Next.js.

Any hint would be great, Thanks

It's good to separate to backend server and frontend server.

  • backend server (restful API/websocket/...): connect to database, do business logic and serve data for the client. The clients consuming this API include both server (server rendering) and client (client-side react application).

  • frontend server (next.js): Next.JS app helps you build a universal app which both render from serverside and clientside.

About socket.io, The mechanism of it is asynchronous. Emit event and listen to event are the two different things. I think it's only suitable for client side. You can use it for getting realtime data, update UI realtime. If the content need to be served for SEO, you should use RESTful API which help your app easily getting and prerender from server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM