Skip to content

Latest commit

 

History

History

luigi-example-next

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sample Luigi application written in NextJS

Overview

This is the NextJS-based sample application which runs with Luigi framework.

Due to the nature of NextJS's routing strategy, it is not possible to use useHashRouting: false in the Luigi Configuration. If you want to use path based routing, Luigi Core's index.html should be served separately.

NOTE: Due to NextJS's server side nature, injecting Luigi Client in your pages is not straightforward, since Luigi Client relies on the window object only available at the client side. To resolve that, simply include the luigi-client.js file as the source of an HTML script as shown in the home.js file. This will allow you to use Luigi Client as part of the window object of that micro frontend, for example: window['LuigiClient']

Getting Started

First, install dependencies

npm install

Second, build the NextJS app:

npm run build

Next, run the server:

# for production mode
npm run start

# or for development mode
npm run dev  

Open http://localhost:3000 with your browser to see the result.

Learn More

The Next.js project bootstrapped with create-next-app.

To learn more about Next.js, take a look at the following resources:

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.