How to create a child process in nodejs (exec, execFile and spawn)

  Рет қаралды 56,877

Mafia Codes

Mafia Codes

Күн бұрын

In this video you will learn how to create a #child-process in #nodejs, we would be looking into the 4 ways to create a child-process - #exec #execFile #spawn and #fork.
Introduction: 0:00
exec: 1:05
execFile: 5:10
spawn: 8:30
Github: github.com/trulymittal/nodejs...
Deploy apps: zeet.co/r/yourstruly
(One FREE project forever 😘)
FREE $100 credit @Digital Ocean: m.do.co/c/3208f08b3324
Subscribe: kzfaq.info...
Support the channel:
Paypal: www.paypal.me/trulymittal
Patreon: / trulymittal
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/get-kite/?...
---------------
Other useful Playlists
---------------
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
#API Authentication using #JWT: • NodeJS API Authenticat...
#Firebase: • Firebase | Build a Not...
Docker: • Docker
MongoDB: • Learn MongoDB in 50 mi...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
#yoursTRULY #tutorial #howto #nodejs #android

Пікірлер: 60
@FP_95
@FP_95 3 ай бұрын
GOD tier masterclass indeed. Concise and to the point. Not even 15mins long! Saving it to my -Always useful- watch list. Thanks! ✌
@danielnadar75
@danielnadar75 2 жыл бұрын
Awesome stuff!!! Keep up the great work.
@rishavkumar1
@rishavkumar1 2 жыл бұрын
You are amazing bro!! Thanks a lot for making me understand.
@jantack7186
@jantack7186 Ай бұрын
Thanks! Very helpful!
@stith_pragya
@stith_pragya Жыл бұрын
Thank You so Much for providing such a wonderful video..........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@yeshh7993
@yeshh7993 2 жыл бұрын
Thanks man really appreciated this tuto
@karlang2637
@karlang2637 3 жыл бұрын
Amazing explanation. Thank you.
@smartguy3k
@smartguy3k 2 жыл бұрын
very well explained. Thanks
@SuperQuwertz
@SuperQuwertz 2 жыл бұрын
Thank you! Really helpful :)
@riteshthakur9250
@riteshthakur9250 3 жыл бұрын
Amazing video as always
@leamonlee8809
@leamonlee8809 2 жыл бұрын
Nice Explanation!
@rahulbera454
@rahulbera454 3 жыл бұрын
amazing just on point !!! Keep pushing content like see. Btw what zsh theme you are using ???
@sian4d
@sian4d 2 жыл бұрын
Exelente, muchas gracias
@jothinayagan.iyyappan
@jothinayagan.iyyappan 3 жыл бұрын
This video made my day. TQSM 🔥
@mafiacodes
@mafiacodes 3 жыл бұрын
My pleasure 😊
@DeaHHone
@DeaHHone 3 жыл бұрын
Thanks!!!!
@RizwanIshakthesinister
@RizwanIshakthesinister 2 жыл бұрын
Thank you for that well put explanation
@mafiacodes
@mafiacodes 2 жыл бұрын
You are very welcome
@SpencerDavis2000
@SpencerDavis2000 3 жыл бұрын
very helpful video thank you :)
@mafiacodes
@mafiacodes 3 жыл бұрын
You're welcome!
@Vishal360
@Vishal360 Жыл бұрын
crystal clear
@angryman9333
@angryman9333 2 жыл бұрын
you a legend
@user-vv9lz2ik2t
@user-vv9lz2ik2t 3 жыл бұрын
Thanks
@bhupendersoni5467
@bhupendersoni5467 Жыл бұрын
Dude which keyboard are you using? Keystrock sound is so crispy. Please reply.
@razx2009
@razx2009 Жыл бұрын
which mechanical keyboard are you using ? I liked the sound of it
@mukundthakare1041
@mukundthakare1041 2 жыл бұрын
Hello Thanks for the explanation. I have doubt regarding the spawn. Can I use Spawn to launch the .exe file (.exe is a console application developed using the visual studio, which renders different shapes using openGL and transfer rendered data to the server and then server display this data on the browser ? ) Right now the issue I am facing is whenever I launch the .exe using spawn I am not able to render anything in openGL context.
@imthelordoflove5362
@imthelordoflove5362 Жыл бұрын
thank you very much brother you literally saved me😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭
@sivaragu3391
@sivaragu3391 2 жыл бұрын
Thanks for the explanation brother… Im trying to open exe by using this,it is working in my local machine but after deployment it is not working why..any idea? Im calling this method from angular application
@jaggesher
@jaggesher 3 жыл бұрын
First of all thanks For this awesome content. I have another query, Can I have your vs code config?
@suryapratap9915
@suryapratap9915 Жыл бұрын
@mafiacodes Can I run javascript file also using execFile ?
@ahmedhassaballa9909
@ahmedhassaballa9909 Жыл бұрын
Hi can you please help me to figure out what is cmd equivalent for FIND for windows PowerShell ? much appreciated thank you
@atultiwaree6023
@atultiwaree6023 Жыл бұрын
I'm getting error spawn enoent, when running command other than node --version in windows machine please help
@technoinfoworldwide2329
@technoinfoworldwide2329 3 жыл бұрын
I am waiting for your video tutorial how you made your npm packages
@examsubway2034
@examsubway2034 3 жыл бұрын
Man you will live for 100 years
@soumityachauhan8609
@soumityachauhan8609 3 жыл бұрын
when i trun on my laptop hotspot With that when i connect some external device with that hotspot My local server should be listen that external device With node please help Thankyou
@p._7555
@p._7555 Жыл бұрын
minute 2:00 and I'm already loving your vscode setup 😍😍
@p._7555
@p._7555 Жыл бұрын
theme, FONT and CONSOLE
@kayderl
@kayderl 11 ай бұрын
I like how he calls himself “killer”
@sifagayev7793
@sifagayev7793 Жыл бұрын
that cursive font came out of nowhere
@AnupKumar-fy4ub
@AnupKumar-fy4ub Жыл бұрын
How to run mongodb shell commands? it's not working with this.
@mthaha2735
@mthaha2735 3 жыл бұрын
Where would these modules be useful. Or they have a particular use case that you have shown in the video?
@mafiacodes
@mafiacodes 3 жыл бұрын
depends on use case
@DemPilafian
@DemPilafian Жыл бұрын
Using *require?* Is this video from 2021 or from 2011?
@biltten5786
@biltten5786 3 жыл бұрын
I really did not understand what is point of creating a child here
@riteshthakur9250
@riteshthakur9250 3 жыл бұрын
Can you make a code review session on your channel where we can submit our git repo and you can review our repo and tell how can we improve our code and review our repo😊
@mafiacodes
@mafiacodes 3 жыл бұрын
Seems interesting, will see how we can do it.
@itsmochino
@itsmochino 6 ай бұрын
i came because curios, about how to send stdin while using child_process. e.g if i hve file `inp.js` which using readline-sync for prompt input. and i also have `call.js` to call `inp.js` using child_process, i want to send input and press enter. i' was tryng research, but still stuck bad.
@Uthalerebaba-nr4qi
@Uthalerebaba-nr4qi Ай бұрын
Did you find out how to do it?
@itsmochino
@itsmochino Ай бұрын
@@Uthalerebaba-nr4qi yes, i have applied it in my project. just do: const output = execSync(command, { input: "0 " }).toString();
@soumityachauhan8609
@soumityachauhan8609 3 жыл бұрын
ls -lh. Is not working ? And when i hit ls -lh in cmd Show err ls not recognized Thankyou awesome video
@mafiacodes
@mafiacodes 3 жыл бұрын
Use an equivalent windows command like - dir
@DTUSEM
@DTUSEM Жыл бұрын
This can help to build online judge for online editor for programming language.
@dulalsandip7950
@dulalsandip7950 3 жыл бұрын
where can we see the real application of child process in our software application?
@mafiacodes
@mafiacodes 3 жыл бұрын
Like for example ur making cmd line applications, or u want to exec some script on certain conditions, or if u want to train an ml model on different thread, or if u want to backup database. This db backup example is coming in a couple of days and u can see the real application
@dulalsandip7950
@dulalsandip7950 3 жыл бұрын
@@mafiacodes sounds great. waiting for the real application of child process video desperately and waiting for npm packages video too how you made.The best channel ever seen on node.hats off to your effort sir
@biltten5786
@biltten5786 3 жыл бұрын
please add links to prev,next video or at least add video number
@andyalejandro9523
@andyalejandro9523 3 жыл бұрын
Need lovely 😍💋 💝💖❤️
@estakenyajarn3693
@estakenyajarn3693 3 жыл бұрын
I'm Alone 😍😥
@sayanbhattacharyya1455
@sayanbhattacharyya1455 2 жыл бұрын
I am trying to run a compiled c program using spawn, but is showing error. I am using Linux. events.js:174 throw er; // Unhandled 'error' event ^ Error: spawn a ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:834:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) at onErrorNT (internal/child_process.js:415:16) [... lines matching original stack trace ...] at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) please help me.
@mafiacodes
@mafiacodes 2 жыл бұрын
it should not, may try on a different machine, if there also you get an error, share your repo
How to scale NodeJs applications using the cluster module.
13:37
Mafia Codes
Рет қаралды 49 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 18 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН
PROOF JavaScript is a Multi-Threaded language
8:21
Beyond Fireship
Рет қаралды 267 М.
multiprocessing: fork() vs. spawn() (intermediate) anthony explains #492
10:59
All you need to know about "child_process" in Node.js
12:38
Software Developer Diaries
Рет қаралды 3,9 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 632 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 416 М.
Learn how to do caching in NodeJS using Redis
24:34
Mafia Codes
Рет қаралды 33 М.
Concurrency vs Parallelism in Node.js
7:47
Mehul - Codedamn
Рет қаралды 40 М.