N
N
Nikita Kotenko2018-06-26 17:22:36
JavaScript
Nikita Kotenko, 2018-06-26 17:22:36

What's the difference between standalone API on Node and API on serverMiddleware?

Sorry if the question seems stupid, I'm only learning NUXT JS, but explain to me the fundamental difference between:

  • separately (if you can call it that) by a running server script on Node + express, which returns a simple json on request (I am learning to build an api)
  • and using serverMiddleware doing the same

taking into account the fact that all this runs on one machine?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Chipiga, 2018-06-26
@Xaz16

The question is not quite correctly posed, but it is more difficult to answer it correctly than the nuxt documentation
https://nuxtjs.org/api/configuration-servermiddleware/
That is, if you use a Node+express server to give static and respond to various RESTs (where middlewars are also used, by the way), then serverMiddleware is part of the nuxt ecosystem for SSR (Server side rendering).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question