Skip to content
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

can nextjs be used in a non-javascript framework ? #1933

Closed
sandys opened this Issue May 10, 2017 · 7 comments

Comments

4 participants
@sandys
Copy link

sandys commented May 10, 2017

hi guys,
nextjs is something that we have watched with a lot of excitement. However, the big issue we had was that our api stack is already in python+flask. We want to build several admin dashboards and we are seriously considering nextjs... but it is not obvious on how this will work.

is nextjs supposed to be used as the view layer of a non-javascript stack : say flask or rails ? Somewhat like this - https://realpython.com/blog/python/the-ultimate-flask-front-end/

or is it intended to be a javascript framework ?

@impronunciable

This comment has been minimized.

Copy link
Contributor

impronunciable commented May 10, 2017

I don't know if I'm answering your question but next.js is not supposed to replace your backend. Next is a client-side framework that happens to have a server-side component to allow features like HMR and SSR. You can definitely combine it with your flask app.

@timneutkens

This comment has been minimized.

Copy link
Member

timneutkens commented May 10, 2017

The best description to give Next.js is a frontend server. It can communicate with any backend using getInitialProps 😄 This is a good example: https://github.com/zeit/next.js/tree/master/examples/data-fetch

@sandys

This comment has been minimized.

Copy link
Author

sandys commented May 10, 2017

@sandys

This comment has been minimized.

Copy link
Author

sandys commented May 10, 2017

@impronunciable

This comment has been minimized.

Copy link
Contributor

impronunciable commented May 10, 2017

@sandys exactly. You'll be able to use next export and just use it without the nodejs side. AFAIK there are people already using that branch

@timneutkens

This comment has been minimized.

Copy link
Member

timneutkens commented May 10, 2017

Exactly like Dan said 👍

@rgbkrk

This comment has been minimized.

Copy link
Contributor

rgbkrk commented Jul 27, 2017

What would the best way to provide CSRF tokens and base URL to the next app? Query parameters?

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.