Experience with nuxt and phoenix

Hello everyone,

Has anyone have some experience with nuxt and phoenix stack?

I want to know if the nuxt stack doesn’t make the phoenix server slower then it would be with just simple phoenix?

Thank you in advanced

Do you mean https://nuxtjs.org? (if so it might be worth adding some additional info to your post :023:)

1 Like

Thanks @AstonJ for the suggestions.

@AstonJ Yes I am interested if going SSR(server side rendered) is better then simple phoenix from a performance point of view, also scalability.

So the stack that I am reffering to is:

NUXT https://nuxtjs.org](https://nuxtjs.org/
Graphql(Absinthe)
Phoenix
Ecto

or Phoenix with views simple HTML rendered.

Using Nuxt.js will have no effect on Phoenix’ performance.

Nuxt.js is a way to achieve SSR using JS. You would typically reach for it if you need a single page application where render speed and search engine optimization (SEO) matters. This is not always the case (e.g. the SPA is behind a login and the user reaches a landing page first).

Using default Phoenix with its templates gives you SSR out of the box. You don’t need Next.js unless your app is heavily interactive with a lot of JS.

2 Likes

@bulldog_in_the_dream But wouldn’t i use a phoenix server that serves a graphql api and a node based server from nuxt and some frontend also from nuxt(Vue2)?

Thanks in advance

I don’t know Nuxt.js in depth, but it seems it can also just build static pages (i.e. with no Node server in production). In any case nothing is preventing your frontend from talking directly to the Phoenix backend, you don’t need to go via a Node backend.

What makes you reach for Nuxt.js instead of just using Phoenix?

SSR and I have a lot of js in my app that i am planing.

Also GOOGLE doesn’t index the spa’s anymore.

Ok. Then I would use Nuxt to generate static pages for production and let the frontend talk directly to Phoenix, there’s no loss of speed in that.

2 Likes

Thank you for providing all these answers and help me get a better idea of what I will have to do.

Really appreciate it

1 Like