How to run NextJS on the server
The steps below are for running a NextJS app from Plex. Before following these steps,
make sure you have copied your app files to your site (for example, using FileZilla).
Ready? Okay, let's get started.
1.- Make sure you have [Link] enabled for your website. You can do this from "Get
Started."
2.- Configure options for [Link].
Important:
- Select the latest [Link] option or the one your website requires.
- Make sure the document root is pointing to the main path where the NextJS
application will be.
- Enter the name of your startup file. Typically, for a NextJS app, you'll need to
generate a [Link] file to start the server in production.
3.- When the configuration is ready, press the “Enable [Link]” button.
4.- Select the "Run [Link] commands" tab.
5.- Here you can run the commands to install dependencies and build the app.
- First select “install” to install all of your app’s dependencies.
Wait for the process to finish, it may take a few seconds.
- Then run the script to build your app (usually called build)
Wait for the process to finish, it may take a few seconds.
Optional - setting environment variables
If your application uses any environment variables, you may need to configure them
here.
Enter the tuple of values that represent your variables for the production environment
(key, value)
End