1

I'm new to back-end coding, and I'm struggling to understand exactly what a "fullstack" app would look like. Is it:

  • A Node-Express server that serves index.html, which has <script src="main.jsx"></script> in it (If this is the case, how would the .jsx content get compiled into browser-ready javascript?)
  • A Node-Express server that serves some data (.json) + a frontend app (that you would initialize with Vite or CRA) that fetches from said server?
vietan
  • 126
  • 1
  • 7

1 Answers1

1

Both are currect , your server can serve content to the cliend (first case) or send data to the client (json , xml or etc).

Note that when you are working with react and .jsx component you have to build your project and server the html file (including js , css) via express server

Moein Moeinnia
  • 1,945
  • 3
  • 10
  • 26
  • Do I have to build it? How come when I just use Vite, and I start up a dev server (`npm run dev`), all `.jsx` files are understood by the browser, and they don't have to build anything? I don't see any `build` or `dist` folder. – vietan Jan 24 '23 at 07:16
  • 1
    in development mode , files are build but not stored in the file system , instead its stored in memory temporary – Moein Moeinnia Jan 24 '23 at 07:24
  • 1
    if you run `npm run build` or `vite build` build files are stored in your file system – Moein Moeinnia Jan 24 '23 at 07:27