In this video, when you run `build:dev` or `build:prod` cmds, it always shows some warning msg in the terminal. I actually forgot to use already installed `webpack-node-externals` package completely. To avoid the warning msg, you simply need to update your code as follow, ... const nodeExternals = require('webpack-node-externals'); // just add this line `module.exports = { entry: { main: './index.js' }, ... ... target: 'node', externals: [nodeExternals()], // just add this line ... ... }` I hope it will help you.
Thank you very much for your assistance! Your guidance has been incredibly valuable to me, especially since I was struggling to find adequate resources. Your video proved to be a significant help and saved me a lot of time. I appreciate your dedication and the wonderful work you do. Once again, thank you, and please continue your excellent work!
@TechTechGo suppose in the node project we are maintaining the logs in folder and also template in the folder. when we build the project how this can work? How to add static folder?
It depends how you want to proceed but yes before you deploy your rest api. Usually there will be development and production servers. So, answer is yes if you have different servers and want to push different artifacts to different severs.
Hi sir, Thank you so much for great tutorial. I am leaning MERN stack but I didn't have much industry experience in MERN stack, is this the best way which every company use to deploy node js code on server?
Yes yes it is standard way but the demo I presented here is very basic. For MEAN or MERN stack, yes you will have to consider other things also but for node app, it is standard way.
thank you i didnt know that we can have 2 webpack config files , so now we can have 2 config files one for node environment and the other one for web browser environment wright?
@@sjljc2019 i don't use them both of them. I use cloud but I guess yes it should be possible. Those are just artifacts which you need to deploy onto server...
Thanks for your video. in my project structure controllers and models and some other folder are there. In this folder i maintain routers. how to build the file with all files
Yeah in real life projects, many things will be there eg. controllers, models, routes etc. However, approach will remain same. There is no difference. You can follow same steps and it must work.
@@techtechgo Thanks its working but how to add other than js files to web pack config js file.in my application iam mainintaing js files and access.log and serverver.log files. My question is how to add log extension files to webpack
@@kranthikumarreddy8632 sorry, I couldn't understand your requirement. Test files? Test files don't go to build artifacts. They are for development purpose and what is log files? The logs work in development , similar way it should work on your dev/prod server...
@@saitejakondaa i did same as said in the video. i know my project folder structure is not good. i'm just a beginner. drive.google.com/file/d/1RB-W4fiuCYaJdiUGYkbm1_XP8B-q1ht9/view?usp=sharing
In this video, when you run `build:dev` or `build:prod` cmds, it always shows some warning msg in the terminal. I actually forgot to use already installed `webpack-node-externals` package completely. To avoid the warning msg, you simply need to update your code as follow,
...
const nodeExternals = require('webpack-node-externals'); // just add this line
`module.exports = {
entry: {
main: './index.js'
},
...
...
target: 'node',
externals: [nodeExternals()], // just add this line
...
...
}`
I hope it will help you.
Thank you very much for your assistance! Your guidance has been incredibly valuable to me, especially since I was struggling to find adequate resources. Your video proved to be a significant help and saved me a lot of time. I appreciate your dedication and the wonderful work you do. Once again, thank you, and please continue your excellent work!
Thanks 😊
very informative video, very informative
Great tutorial helps me a lot. Thanks.
@TechTechGo suppose in the node project we are maintaining the logs in folder and also template in the folder. when we build the project how this can work? How to add static folder?
i did it and worked fine. now can u explain how we can host this for free of cost
Can we use this for huge project with controller and mongo
Thank you
Pls check the pinned comment to resolve the warning msg.
need webpack file
Good Explanation
How well can it handle concurrent requests
can you provide github link??
Unfortunately it is not available on Github...
Thank you, is this obligatory before I deploy my rest api?
It depends how you want to proceed but yes before you deploy your rest api. Usually there will be development and production servers. So, answer is yes if you have different servers and want to push different artifacts to different severs.
@@techtechgo thanks
can you send this code?
Hi sir, Thank you so much for great tutorial. I am leaning MERN stack but I didn't have much industry experience in MERN stack, is this the best way which every company use to deploy node js code on server?
Yes yes it is standard way but the demo I presented here is very basic. For MEAN or MERN stack, yes you will have to consider other things also but for node app, it is standard way.
@@techtechgo what are some of the other things to consider?
thank you i didnt know that we can have 2 webpack config files , so now we can have 2 config files one for node environment and the other one for web browser environment wright?
No. 2 config files. 1. development environment 2. Production environment.
Your development and Production configurations will be different.
Can we run the build file using PM2??
Unfortunately I don't have any idea about it.
@@techtechgo Okay. Then how will we run the build file in a prod server? Any suggestion on this part?
@@sjljc2019 you just have to deploy these files to your deployment server (you may think about putting CI/CD pipleline on place to do that job).
@@techtechgo But to execute those we might need a server like Apache2 or Nginx. Will it work on these?
@@sjljc2019 i don't use them both of them. I use cloud but I guess yes it should be possible. Those are just artifacts which you need to deploy onto server...
I see you are bundling your server code, is there a way to use webpack dev server in express with an existing express server?
You meant how to run node/express app using webpack locally right?
it show Error: Please install tedious package manually
Whats the point to bundle server code ????!?
You have not followed SOLID principles and neither defined connection type of server.
Thanks for your video. in my project structure controllers and models and some other folder are there. In this folder i maintain routers. how to build the file with all files
Yeah in real life projects, many things will be there eg. controllers, models, routes etc. However, approach will remain same. There is no difference. You can follow same steps and it must work.
@@techtechgo Thanks its working but how to add other than js files to web pack config js file.in my application iam mainintaing js files and access.log and serverver.log files. My question is how to add log extension files to webpack
@@kranthikumarreddy8632 sorry, I couldn't understand your requirement. Test files? Test files don't go to build artifacts. They are for development purpose and what is log files? The logs work in development , similar way it should work on your dev/prod server...
GoodJob!
it is showing me an error
What was the e4r94?
@@AnonymousPumpkin616 what is the error?
@@saitejakondaa wher can you see it?
@@saitejakondaa i did same as said in the video. i know my project folder structure is not good. i'm just a beginner. drive.google.com/file/d/1RB-W4fiuCYaJdiUGYkbm1_XP8B-q1ht9/view?usp=sharing
@@techtechgo it worked completely fine for me thanks mate