Size: a a a

Nuxt.js | Vue SSR

2021 February 07

SC

Sheldon Cooper in Nuxt.js | Vue SSR
So? The question is?
источник

AH

Adrien H in Nuxt.js | Vue SSR
If i m correct, in universal mode,
- a node instance is launched
- we dev in vue JS like before, and act as a server code ? I mean we don t have to code in NodeJs anymore?
источник

AH

Adrien H in Nuxt.js | Vue SSR
as for the Database a simple json is enough because it s server side ?
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Your components will run: 1st on server-side (new page opened in browser). The browser (or search-crawler) receive rendered HTML with attached SPA in it, which will be hidrated at client-side.
источник

V

Vyacheslav in Nuxt.js | Vue SSR
Доброй ночи
когда подключаю плагин в nuxt.config то получаю "ReferenceError
document is not defined"
(даже по видеоурокам смотрел, как подключают, все равно результат такой же
пробовал заносить еще сам компонент с плагина в <noSsr> тег,
пробовал добавлять transpile, все-равно такая байда)
как решить это?
источник

AH

Adrien H in Nuxt.js | Vue SSR
meaning we got a client-server app with only one language vue.js right ?
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Adrien H
If i m correct, in universal mode,
- a node instance is launched
- we dev in vue JS like before, and act as a server code ? I mean we don t have to code in NodeJs anymore?
Any clicks on nuxt-links (on client-side) will works the same with SPA.
источник

AH

Adrien H in Nuxt.js | Vue SSR
that really powerfull, i now can remove all my nodeJS code and keep all my logic in my vueJS scripts
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Adrien H
meaning we got a client-server app with only one language vue.js right ?
Client - yes. But server app is specific. Main server function - is provide HTML  for crawlers, instead of JS (like VUE do). And a little improve the speed of your pages for visitors.
источник

AH

Adrien H in Nuxt.js | Vue SSR
ok ok, but what about the services i had server side in nodeJS ? like the getter that vue send habitually
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Adrien H
that really powerfull, i now can remove all my nodeJS code and keep all my logic in my vueJS scripts
Depends on - what you nodejs code do. If it store something or cache the data - you cant replace such functionality with nuxt only.
источник

AH

Adrien H in Nuxt.js | Vue SSR
it store in postgre DB
источник

AH

Adrien H in Nuxt.js | Vue SSR
it s not possible to modify a JSON file in a nuxt only app like a DB ?
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Adrien H
it store in postgre DB
So you need "true" back-end framework for DB access. Nuxt absolutely can't do that.
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Adrien H
it s not possible to modify a JSON file in a nuxt only app like a DB ?
No.
источник

AH

Adrien H in Nuxt.js | Vue SSR
ho ok, for a second i though i could just use vue js for all my app, client as server logic
источник

AH

Adrien H in Nuxt.js | Vue SSR
would have been to easy i guess
источник

SC

Sheldon Cooper in Nuxt.js | Vue SSR
Nuxt can request API, recieve the data (JSON), render and pass it to browser.
источник

AH

Adrien H in Nuxt.js | Vue SSR
yeah like any client js code
источник

AH

Adrien H in Nuxt.js | Vue SSR
native js does all that too XD
источник