This repository contains the source code for an E-Shop built using Next.js.
- Admin panel (Microfrontend app)
- API Server (GraphQL and REST API server)
Make sure you have Node.js (v20)
-
Clone the Repository:
git clone https://github.com/Sergey-Nag/mf-host-app.git cd mf-host-app
-
Install Dependencies:
npm install
Run the application in development mode using the custom server. This script launches the server defined in server.js
with the configured /admin
route that renders the SPA Microfrontend React app.
npm run dev
Run the Next.js development server.
npm run next:dev
Build the Next.js application for production.
npm run build
Start the built Next.js application in production mode.
npm run start
Lint the project using Next.js linting.
npm run lint
Generate types using GraphQL code generation. This script uses the configuration defined in codegen.ts
. (The API Server must be running)
npm run generate-types
The application is configured to launch with a custom server defined in server.js
. This server handles the /admin
route, rendering the SPA Microfrontend React app.
For the admin panel, we utilize the Admin Microfrontend app. Ensure it is built and running to access the /admin
route.
To work with data, you need to run the API Server app first.