NuxtN
Nuxt2y ago
16 replies
EliteEngineer

How do i deploy my nuxt app to a vps

I have an application with database, apis and everything, its not a static site, and its working fine on localhost.
I tried following the instructions at https://nuxt.com/docs/getting-started/deployment, but i didnt find much luck deploying my application.
I ran
pnpm i
then pnpm run build and finally pnpm pm2 start .

ecosystem.config.cjs
module.exports = {
    apps: [
      {
        name: 'Scacchi-Belli',
        port: '3004',
        exec_mode: 'cluster',
        instances: 'max',
        script: './.output/server/index.mjs'
      }
    ]
  }

ecosystem.config.js
const ecosystemConfig = require('./ecosystem.config.cjs')

module.exports = ecosystemConfig


After pm2 start it seemes to be all fine, but when i connect to my ip address on port 3004 it doesnt respond with anything
image.png
Was this page helpful?