Reputation: 1202
I'm trying to start a nuxt.js project on Plesk. Plesk need a Application Startup File, but nuxt.js have no index 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
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
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
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
Reputation: 1202
I found the solution:
In the field Application Startup File you have to put node_modules/nuxt/bin/nuxt-start
.
Upvotes: 0