问题
I have tried to deploy my Nestjs deploying on IIS server. I have configured iisnode on IIS that works fine for express application but I am getting errors for missing modules for nestjs. I have tried following commands for building production package
npm run start:prod
and
npm run webpack
but failed to deploy on IIS. How can I build a deployment package?? so I can deploy. I am new with nodejs and Nestjs.
回答1:
Look at the project's package.json. You'll see that start:prod is a script that runs node on the compiled output of the project. You get the compiled output by running:
npm run prestart:prod
that will re-build your app into the dist folder.
So you can
- Zip up the dist folder
- deploy to the target host
- Unzip it
- Try running iisnode on it
let me know how that works
来源:https://stackoverflow.com/questions/53046414/deployment-on-iis-of-nestjs-application