At work, I got some little insight to nuxtjs development and I got very interested in it. So, I started developing on my own a little bit, but now, I'm stuck with my finished project.
To develop, I spin up a local server with "npm run dev" in my CLI. This all works fine.
But, how do I deploy my now finished project to run it in something like nginx (or are there better alternatives that run on an Windows Server environment) on my home server? I heard about "npm run build" into my CLI, but how is the procedure beyond that? And is that command even the right method?
I'm absolutely a noob in this department. Could anybody teach me step by step what I have to do to go "in production"?
Thank's very much in advance!
Max
Of course, "npm run dev" isn't a viable option for production. It's only accessable from the machine the server is running on.
npm run build
, you should have production files in thedist
folder, just upload the contents and it should be fine (given that they're static files). – Spunkynuxt generate
(ornuxt-ts generate
) and builds the output in thebuild
folder. For SSR + Client apps (ie. a Node server is needed to run the application), Nuxt creates a.nuxt
folder after callingnuxt build
(ornuxt-ts build
), which can be deployed as a Node.js application. – Yoicks