poldixd
poldixd

Reputation: 1202

How to start nuxt.js on plesk?

I'm trying to start a nuxt.js project on Plesk. Plesk need a Application Startup File, but nuxt.js have no index file.

Application Startup File How can I start the server? Do I have to create a server.js and in this file execute npm run start?

Upvotes: 1

Views: 3396

Answers (4)

Wrister
Wrister

Reputation: 1

Have been struggling with the start up file for some days in Nuxt3. Finally found a solution. Thought I share it here, seeing this was my top search result.

I made a file called app.cjs, with the code:

// !!! the ./ at the beginning is important !!!
import('./.output/server/index.mjs');

I used that file as a Startup File, worked for me.

Credit: How to deploy NUXT3 on Plesk using Phusion Passenger

Upvotes: 0

Okan Sari
Okan Sari

Reputation: 1

Click run script button and type start and close page if you want to restart again and show running process.
Type this:

pgrep -f npm

And then kill that process:

kill -9 <PID>

Upvotes: 0

Lim Socheat
Lim Socheat

Reputation: 715

Need to install nuxt-start module

npm i --save nuxt-start

in Application Startup File

node_modules/nuxt-start/bin/nuxt-start.js

Upvotes: 3

poldixd
poldixd

Reputation: 1202

I found the solution:

In the field Application Startup File you have to put node_modules/nuxt/bin/nuxt-start.

Upvotes: 0

Related Questions