I actually struggled to generate Development and Production builds for Node/Express app. So, I decided to create a video to help others. P Github Repository : github.com/tec...
Пікірлер: 47
@techtechgo Жыл бұрын
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.
@Rohitkumar-vq1yk5 ай бұрын
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!
@techtechgo4 ай бұрын
Thanks 😊
@ladislavteply985611 ай бұрын
Great tutorial helps me a lot. Thanks.
@AnonymousPumpkin6162 ай бұрын
i did it and worked fine. now can u explain how we can host this for free of cost
@sanjayajanakantha7883 Жыл бұрын
Thank you
@techtechgo Жыл бұрын
Pls check the pinned comment to resolve the warning msg.
@manishyadav-lk6vb11 ай бұрын
Good Explanation
@Kahipan132410 ай бұрын
@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?
@babukamal473Ай бұрын
need webpack file
@bhavikdoshi48668 ай бұрын
can you send this code?
@funtoo_trader8 ай бұрын
Can we use this for huge project with controller and mongo
@abhishektotad31839 ай бұрын
it show Error: Please install tedious package manually
@chesterxp5087 ай бұрын
GoodJob!
@tradinghubindia523011 ай бұрын
How well can it handle concurrent requests
@chiragsolanki12343 ай бұрын
can you provide github link??
@techtechgo3 ай бұрын
Unfortunately it is not available on Github...
@user-ud2vq1nr1e9 ай бұрын
Whats the point to bundle server code ????!?
@mohamedabass2736 Жыл бұрын
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?
@techtechgo Жыл бұрын
No. 2 config files. 1. development environment 2. Production environment. Your development and Production configurations will be different.
@webfreelancershub6718 Жыл бұрын
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?
@techtechgo Жыл бұрын
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.
@abduladilsunnat2489 Жыл бұрын
@@techtechgo what are some of the other things to consider?
@dylanmarais35 Жыл бұрын
I see you are bundling your server code, is there a way to use webpack dev server in express with an existing express server?
@techtechgo Жыл бұрын
You meant how to run node/express app using webpack locally right?
@developer_hadi Жыл бұрын
Thank you, is this obligatory before I deploy my rest api?
@techtechgo Жыл бұрын
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.
@developer_hadi Жыл бұрын
@@techtechgo thanks
@kranthikumarreddy8632 Жыл бұрын
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
@techtechgo Жыл бұрын
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.
@kranthikumarreddy8632 Жыл бұрын
@@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
@techtechgo Жыл бұрын
@@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...
@sjljc20198 ай бұрын
Can we run the build file using PM2??
@techtechgo8 ай бұрын
Unfortunately I don't have any idea about it.
@sjljc20198 ай бұрын
@@techtechgo Okay. Then how will we run the build file in a prod server? Any suggestion on this part?
@techtechgo8 ай бұрын
@@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).
@sjljc20198 ай бұрын
@@techtechgo But to execute those we might need a server like Apache2 or Nginx. Will it work on these?
@techtechgo8 ай бұрын
@@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...
@AnonymousPumpkin6162 ай бұрын
it is showing me an error
@saitejakondaa2 ай бұрын
What was the e4r94?
@techtechgo2 ай бұрын
@@AnonymousPumpkin616 what is the error?
@techtechgo2 ай бұрын
@@saitejakondaa wher can you see it?
@AnonymousPumpkin6162 ай бұрын
@@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
@saitejakondaa2 ай бұрын
@@techtechgo it worked completely fine for me thanks mate