help to exported #77176
Replies: 1 comment
-
To achieve the structure you're asking for, where you have a "server" folder and a "client" folder, you can structure your Next.js project similarly to how Angular handles separation of client and server-side code. In Next.js, you can set up separate directories and manage your backend (API routes) and frontend (client-side pages) separately. Here’s a basic approach: Server Folder: You can place your API routes inside the pages/api directory. Next.js treats this as server-side code. You can keep all your server-side logic, like interacting with databases, API integrations, etc., here. Client Folder: All your frontend code (React components, pages, etc.) will be inside the pages and components directories. This is the client-side part where you build the UI, and Next.js will handle the routing and rendering of these pages. For example, your folder structure might look like this: bash
This structure makes it easy to separate your backend and frontend concerns, while still using the powerful Next.js features for SSR (server-side rendering) and API routes. Also, if you want to integrate Tauri for native desktop app development and use Ionic for UI components, Next.js should work well as it's highly customizable and flexible for modern frameworks. By using Next.js instead of Angular, you can take advantage of its hybrid approach with server-side rendering, static site generation, and dynamic routing, which might provide a better experience depending on your use case. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
i want to the exported things to come out as two folders,the first folder is for "server", and the second folder is for "client " like angular.
Non-Goals
Background
because i want use tauri and ionic lib in my project like angular .
because the nextjs lib is better then angular framwork
Proposal
.
Beta Was this translation helpful? Give feedback.
All reactions