Learn Electron in Less than 60 Minutes - Free Beginner's Course

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2017
  • Course Page: goo.gl/NiWDq7 (Written version + Project files)
    coursetro.com for more.
    SUBSCRIBE if you enjoy this!
    In this 59 minute course, you're going to learn the basics of the Electron framework. Electron gives you the ability to create native desktop applications using HTML, CSS and Javascript. These apps work on Windows, Mac and Linux.
    We will create a Bitcoin price alert app that will allow a user to set a price in order to receive a native desktop notification if the current price of Bitcoin exceeds the specified amount.
    You're going to learn a lot in the next 59 minutes!
    What you will learn
    - Installing Electron
    - Working with Electron Menus
    - Integrating an HTTP Library for making API Calls
    - Communicating between multiple windows with IPC
    - Accessing Native Desktop Functionality
    - Styling a Electron App
    - Deploying your Electron App
    Requirements
    - Nodejs (Free!)
    - Code Editor (Visual Studio Code is Free!)
    - A keen willingness to become an awesome developer
    / coursetro
    coursetro.com
    - - - - - - - - - - - - - - - - - - - - - -
    Subscribe for NEW VIDEOS weekly!
    My site: designcourse.com
    My personal FB account: logodesigner
    Coursetro FB: coursetro
    Coursetro's Twitter: / designcoursecom
    Join my Discord! / discord
    ^-Chat with me and others
    - - - - - - - - - - - - - - - - - - - - - -
    Who is Gary Simon? Well, I'm a full stack developer with 2+ decades experience and I teach people how to design and code. I've created around 100+ courses for big brands like LinkedIn, Lynda.com, Pluralsight and Envato Network.
    Now, I focus all of my time and energy on this channel and my website Coursetro.com.
    Come to my discord server or add me on social media and say Hi!
  • ХоббиХобби

Комментарии • 366

  • @DesignCourse
    @DesignCourse  6 лет назад +99

    Coming soon: Electron + Angular 5 / Electron + Vue.js. -- and intermediate Electron tutorials.

    • @noormohammedshikalgar
      @noormohammedshikalgar 6 лет назад

      Hey Sorry For my comment , i realize that my timezone is further so im really sorry

    • @DesignCourse
      @DesignCourse  6 лет назад

      No problem, yeah, it's 11 AM here. ;)

    • @noormohammedshikalgar
      @noormohammedshikalgar 6 лет назад

      thanks for your reply i thought i was rude little bit...
      so thank you for the electron .... i am amze to learn more about electron.....

    • @kuldeepbhatt8475
      @kuldeepbhatt8475 6 лет назад

      Hey, I am stuck with routing issues with bootstrap 4 and angular5+ electron. It goes freeze for normal route link, not sure what i am doing wrong. I would be happy if you address elements such as navbar, menu and routing on your videos so i can rectify my mistake. Thanks, I am your new subscriber.

    • @noormohammedshikalgar
      @noormohammedshikalgar 6 лет назад

      Hey , Im trying to do notification but its not working , not showing there not any error in console log and also the btn click is working properly but the notification is not showing on the screen i also followed the written tutorial but it same as early what to do? any suggestions please!

  • @heavenseyes1911
    @heavenseyes1911 4 года назад

    Let me just say that this is the most impressive audio and visuals I have seen in a tutorial. Fantastic work!

  • @kevinrauer
    @kevinrauer 6 лет назад +5

    Amazing.. I have been meaning to try Electron for more than a year now, and You tutorial has started the fire.. Thanks for laying it all out and answering so many of my question right in the video!! Kudos!!

  • @poloska9471
    @poloska9471 5 лет назад +3

    You made a very nice course, extremely clean, understandable, and very well recorded/ edited.

  • @askimakdag
    @askimakdag 6 лет назад +2

    It was the best beginer course i have ever seen. Thank you gary !!

  • @Ohilipp
    @Ohilipp 6 лет назад

    Great videos! For me the best video-tutor until now, clear voice, excellent content and secondary resources! Many thanks from my side :)

  • @OpCode90
    @OpCode90 3 года назад

    I am writing a custom inventory management and control application for personal use and was banging my head against the desk over the IPC stuff in Electron. I'm a developer of 30+ years and I'm also learning Electron for the first time. This tutorial explained perfectly on how to go about sending those IPC message events back and forth. I just wanted to send you a huge Thank You! I'm now a subscriber and look forward to your courses.

  • @badreenam4472
    @badreenam4472 6 лет назад

    Simply awesome. Gives me a good start with Electron. Thank You.

  • @JustonianInstitute
    @JustonianInstitute 5 лет назад

    Thanks for the free, well produced, articulate and informative tutorial. I learned alot.

  • @MohMed-cx2bl
    @MohMed-cx2bl 5 лет назад +2

    that was the best tutorial i have seen in months ..it helped so much thank you so much,its great

  • @nngogol244
    @nngogol244 6 лет назад +46

    Short and Excellent. That's what I called a "GREAT TUTORIAL".
    Nice montage. No 'emm..', no 'aaa'. Everything is *clean* and *understandable.*
    I just love you. Thanks for your work. *Thumbs up from Gogol.*

    • @zenisapirate
      @zenisapirate 2 года назад

      noice feed back no read more usage !
      SIKE!

  • @ronakpunase80
    @ronakpunase80 5 лет назад +1

    Found the IPC thing really helpful. Great Work

  • @SmugMugg
    @SmugMugg 6 лет назад +6

    Thanks Gary! I've been anticipating this video all week!

  • @G_Ramsay
    @G_Ramsay 3 года назад

    Very great & concise course, thank you for putting it together and making it available for free!

  • @jannikmuller2554
    @jannikmuller2554 5 лет назад +1

    Awesome high-quality tutorial. Thanks man!

  • @manueltoussaint5000
    @manueltoussaint5000 4 года назад

    Thank you for sharing your knowledge. Your tutorial is very well built, easy to follow and put into action. Great stuff!!

  • @seandegee
    @seandegee 4 года назад

    A bit late to the party here, but this is honestly the best tutorial on Electron I've come across to date.

  • @JavierLust
    @JavierLust 6 лет назад +1

    Thank you very much for the tutorial! It was awesome and helped me to understand a bit more electron :)

  • @michaelsimsek
    @michaelsimsek 5 лет назад +1

    loved it! Thank you!!! Tutorial about an app for people communicating, chatting?

  • @behroozzahedi
    @behroozzahedi 6 лет назад

    interrupt info in this video is cool, great idea 👍

  • @francispolignano4208
    @francispolignano4208 6 лет назад +1

    Great tutorial! Thanks for sharing, helped a lot.

  • @jason_liam
    @jason_liam 3 года назад +6

    Those who're wondering why @35:13 the button is not working, below is the solution:
    *Just change*
    let win = new BrowserWindow({frame:false,alwaysOnTop:true,width:400,height:200,
    })
    *this to*
    let win = new BrowserWindow({frame:false,alwaysOnTop:true,width:400,height:200,
    webPreferences: {
    nodeIntegration: true,
    enableRemoteModule: true
    }
    })
    *After doing the above changes inside index.js file you will find that the close window button is working.*

  • @Fabian-_-
    @Fabian-_- 6 лет назад

    How to make it like these desktop apps?:
    - many Steam Game Launchers have a complete own window appearance, like a custom outer form (f. ex. Paladins shows its logo outside the app) (think Google has a image of the launcher)
    Really good explained video! Thanks for that!

  • @CarlosReyes-wx8pr
    @CarlosReyes-wx8pr 4 года назад

    Great tutorial!!! Clean and easy. Subscribed right away

  • @paulpeeters
    @paulpeeters 6 лет назад +1

    Thanks for this. Great tutorial !

  • @Sladeofdark
    @Sladeofdark 5 лет назад

    OMG this.. is everything i have ever wanted in app development. how had i not heard of this before? if it could run on Powershell code, or .net it would be a dream come true.

  •  5 лет назад

    You deserve more subs sir, super useful!

  • @viergehirn
    @viergehirn 6 лет назад

    This Video is awesome. Thank you Gary!

  • @sonikasahay7677
    @sonikasahay7677 6 лет назад

    Waao.... Great one. Saved my life. Thank You :)

  • @a-raheemjamaal5564
    @a-raheemjamaal5564 6 лет назад

    Thumbs up Gary! Awesome video!

  • @luciafava374
    @luciafava374 6 лет назад +1

    Thanks Gary! Awesome videos! can you please make a video of how to deploy with gulp?

  • @amancca
    @amancca Год назад +1

    Great tutorial even after 5 years ❤

  • @nuwang1
    @nuwang1 5 лет назад

    Awesome stuff Gary thanks for contributing

  • @mikadebruijn9890
    @mikadebruijn9890 5 лет назад +1

    This is soo cool, and explained by the best ♥...

  • @wasserfest2219
    @wasserfest2219 3 года назад

    Amazing Tutorial. Thanks a lot!

  • @iancarr3923
    @iancarr3923 5 лет назад

    Excellent, thanks!

  • @SudipBhattacharyya
    @SudipBhattacharyya 4 года назад

    Got an idea of Electron. THANKS! ;-)

  • @Javedboqo1
    @Javedboqo1 4 года назад

    Explain delightfully

  • @tomkache3857
    @tomkache3857 5 лет назад

    Great video! Thanks a lot!

  • @dicui2840
    @dicui2840 4 года назад

    omg, an amazing channel!!

  • @divineinstrument6786
    @divineinstrument6786 6 лет назад

    Well done Gary

  • @Kimo007
    @Kimo007 6 лет назад +5

    Respect from EGYPT

  • @nitrotech9701
    @nitrotech9701 6 лет назад

    Thanks a lot for great tutorials.

  • @deanzhang9099
    @deanzhang9099 5 лет назад

    very excellent. I learn much from this video

  • @ThePakovia
    @ThePakovia 6 лет назад

    great videos, love the camera, graphics, sound all :)

  • @surajkumarvishwakarma5146
    @surajkumarvishwakarma5146 6 лет назад

    Loved your video.

  • @Xdavidel
    @Xdavidel 6 лет назад

    Hi Gary, I think it is better to use require in the main.js file as less as possible... using string interpolation improves performance.

  • @JAYCPRUDZ
    @JAYCPRUDZ 4 года назад

    Legit.. with a little tweak,it's working 100% in 2019.

  • @AJonesB83
    @AJonesB83 6 лет назад

    Awesome, loved it!

  • @Thesrik23
    @Thesrik23 6 лет назад

    Hey Gary! Your tutorials are just awesome.

    • @DesignCourse
      @DesignCourse  6 лет назад

      Thanks, means a lot!

    • @Thesrik23
      @Thesrik23 6 лет назад

      Waiting for you Django beginner, intermediate and advance video series.

  • @ilclaudio123
    @ilclaudio123 6 лет назад

    Very interesting and useful video, thank you :-)

  • @blackdragoninnovations3563
    @blackdragoninnovations3563 6 лет назад +1

    Hey Gary,
    A little tip for Visual Studio Code: if you want to quickly create an HTML document layout, simply create the new HTML file and type *"!"* (without quotes) on the first line, followed by pressing the *TAB* key on the keyboard. It will automatically build out a basic HTML structure for you.

    • @SRTIEP
      @SRTIEP Год назад +1

      Great tip Thank You

  • @haidinurhadinata2661
    @haidinurhadinata2661 4 года назад

    good tutorial.. and for me very easly to about first time learning electron js

  • @sgauntt
    @sgauntt 2 года назад

    Awesome job

  • @yeahvenezuela
    @yeahvenezuela 6 лет назад

    great video, thanks a lot, (tremendo video, muchas gracias)!!

  • @angrishlakshay
    @angrishlakshay 4 года назад +12

    For enabling *Close Window* in the second window, we need to enable nodeIntegration as it is false by default. Otherwise you get the error: *Uncaught ReferenceError: require is not defined*.
    Also, for the latest crypto-compare API, you need to write *res.data.USD* instead of *res.data.BTC.USD*.

    • @asadullah8640
      @asadullah8640 4 года назад

      how and where nodeIntegration is enabled?

    • @sajanmathew7192
      @sajanmathew7192 4 года назад

      Thanks for pointing that out, saved me time

    • @sajanmathew7192
      @sajanmathew7192 4 года назад +4

      @@asadullah8640 in the index.html file
      const modalPath = path.join('file://', __dirname, 'add.html')
      let win = new BrowserWindow({frame: false, transparent: true, alwaysOnTop: true, width:400, height:200, webPreferences: {
      nodeIntegration: true
      }})

    • @ashwingurbuxani317
      @ashwingurbuxani317 3 года назад +1

      @@sajanmathew7192 Thank you Sajan! It worked. It's in the index.js file,.

  • @TheAfranzy
    @TheAfranzy 6 лет назад

    Great stuff. I enjoyed your tutorial.

  • @gilbertocarrillo7097
    @gilbertocarrillo7097 5 лет назад

    Thank you for this video

  • @dinobulja
    @dinobulja 6 лет назад

    Garry, thank you. I am new to Electron and Web in general but experienced in native. I was wondering if you could give some advice. I want to wrap code written in C# into some kind of web wrapper. The wrapper will have to talk to some web service and communicate information (uploads/downloads/changes etc) back to a web or native app. Is Electron built for that and what other technologies are required for something like this?

  • @exezamar
    @exezamar 6 лет назад

    this is awesome!

  • @hostlondonoempezar7906
    @hostlondonoempezar7906 6 лет назад

    hello , Thank you , i am from Colombia very big you helps

  • @szacsp
    @szacsp 6 лет назад

    Your teaching style is awesome. I like it. waiting for Electron + Angular 5 / Electron + Vue.js tutorial.

  • @zeeshanyshaikh
    @zeeshanyshaikh 5 лет назад

    Awesome video 👌👍
    Just a query... How to pass multiple values through ipc. I mean if i have a form with multiple fields.

  • @Slate245Ivanovo
    @Slate245Ivanovo 5 лет назад +2

    Thanks for the great tutorials!
    Correct me if I’m wrong, but after reading the quick-start guide on electronjs I thought that MainProcess has to manage all the windows of an app. Does this mean you shouldn’t have created the “add” window in index.js but rather call main.js?

    • @keithsherry262
      @keithsherry262 4 года назад

      I am only around half-way through the tutorial and wondered the same thing! I'm not sure for the reason why you would want index.js to know anything about add.html... but I am currently just as confused as to why it was called 'add' in the first place. So far, the 'notify' button opens an 'add' window (that doesn't 'add' [yet!]), which is created in 'index'.

  • @jamesjones3879
    @jamesjones3879 6 лет назад

    I have been watching your videos about electron. They are perfect. Well done.
    I have quick question though. I am trying have a small webcam window on the top of the main window. Cam window will stay always on top of main window and can be moved around within the main window. cam window cannot be resized...etc. Where I struggle is to keep the webcam window within the main window.
    Could you please help me about it?
    Thank you,

  • @haryschampultra
    @haryschampultra 3 года назад

    Sir, kindly make react and electron videos, it helps us a lot in practical and professional experience as well.

  • @techboy5019
    @techboy5019 2 года назад

    Best content thanks

  • @bilaltariq50
    @bilaltariq50 6 лет назад

    you are God sent

  • @ranjitredekar8257
    @ranjitredekar8257 5 лет назад +1

    Hey, thanks for awesome video. I tried this with existing Angular 6 application and I'm getting this error
    "Not allowed to load local resource: ". please help me.

  • @nkl_sl
    @nkl_sl 2 года назад

    Thanks a lot

  • @haroldramos1567
    @haroldramos1567 6 лет назад

    Gary what framework do you prefer between react and Vuejs?

  • @robertb4382
    @robertb4382 6 лет назад

    Nice tutorial. All worked for me except the final build. The packaged app is no longer is able to get the bitcoin price. Any suggestions? Thanks!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 6 лет назад +1

    Thank u for this video

  • @mriganksingh7586
    @mriganksingh7586 6 лет назад

    It's easy to pick when you teach 😊

  • @Default64Bit
    @Default64Bit 3 года назад +1

    you can toggle your terminal with ctrl+~
    also, you can make a new terminal with ctrl+shift+~

  • @mohamedsuhailirfankhazi6628
    @mohamedsuhailirfankhazi6628 2 года назад +1

    At first I was shocked at how low the BTC price was. Then I saw the date this video was uploaded at.

  • @MrFooSteven
    @MrFooSteven 3 года назад

    Hey do you know if its possible in electron programming, for it to bring up a window if a mouse cursor is moved towards the edge of monitor?? ie.. similar to Windows "autohide" on the taskbars. Or do you need to use C++ to implement such a feature?

  • @Jaaasperrr
    @Jaaasperrr 5 лет назад +5

    If you have Menu error: ReferenceError: Menu is not defined, do the following:
    Add:
    const { Menu } = require('electron')
    Paste this above the line that states:
    var menu = Menu.buildFromTemplate([
    Now your menu will work!

  • @juliusmubajje7510
    @juliusmubajje7510 6 лет назад

    Hey Gray i might have asked late but would you please make an electron and vue js tutorial basically setup using vue cli 3 or whatever you can please, but the boilerplate has given me a lot of headache

  • @mazzen14
    @mazzen14 6 лет назад

    Hello!
    Is it possible to develop an application that will run first a POST command with a header and a body, and then afterwards use the data from here to run a GET command where the previous data is put into the header?
    Thank you so much everyone

  • @miskellil4844
    @miskellil4844 5 лет назад

    Thank you

  • @minimuffinman
    @minimuffinman 5 лет назад

    Hey,
    I've made a custom HTML/CSS Title Bar - setting the frame to false (frame-less)... the problem is this hides the menu bar (File, Edit etc.) Is there any way to keep the menu bar with the app in frame-less mode?
    Thanks,
    SImon

  • @briansteyer
    @briansteyer 3 года назад

    Thanks for sharing this video. Do you have a link to the CSS files somewhere that you use around 26:00 in the video?

  • @enafor99
    @enafor99 6 лет назад

    THANK YPOU SO MAUCH , AWEASOM tutorial!

  • @SoyLast
    @SoyLast 6 лет назад

    Loved this tuto ^^, thanks for helping me do my first desktop app! ^^, but I was waiting something to not have the console opened everytime the app opens :/.

    • @keithsherry262
      @keithsherry262 4 года назад +1

      Either comment out or delete the line that says "win.webContents.openDevTools()" in main.js! Sorry - 2 years too late I know!

  • @tomasvancoillie
    @tomasvancoillie 5 лет назад +1

    Great tutorial Simon. There were no ";" in 2017?

  • @TejramChafle
    @TejramChafle 6 лет назад

    Superb

  • @Mark4Jesus
    @Mark4Jesus 6 лет назад

    Sorry if you already answered this, but does the exe need to be distributed with all those hundreds of dlls (t=58:19)?

  • @lizieperez7074
    @lizieperez7074 6 лет назад

    Hello, this video was excellent. But I have a terrible problem... I need to list the printers installed in the opertation system, I saw in Electron Documentation the method "contents.getPrinters()", but I don't know how to implement it... I'm a beginner, could you give me a clue please. Thanks. (Sorry my English, I'm from Peru).

  • @adamtemple9417
    @adamtemple9417 5 лет назад +2

    If anyone is getting a win not defined error, it's because of the new quick start code uses MainWindow not win so in your Main.js change the ipc to :
    ipc.on('update-notify-value', function(event,arg){
    mainWindow.webContents.send('targetPriceVal', arg)
    })

  • @ingframin
    @ingframin 5 лет назад +3

    Can I find a place with the full source code? While typing I made a mistake somewhere and the add window doesn't show up anymore :(

  • @studyquant7649
    @studyquant7649 5 лет назад

    Any recommendation about connect Electron with python, and make a exe softwares?

  • @saleschen8691
    @saleschen8691 2 года назад

    Just be curious, What markdown editor did you use for "ELECTRON API DEMOS" at 2:12 ? it seems better than Typora.

  • @BytesAndBrackets
    @BytesAndBrackets 6 лет назад

    Great toturial. I also had hard time with formatting once; here is what I got! in settings (Set default Tab to Space and adjust 4 or 2 spaces config) and install marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode and press Alt+Shift+F and vola :-)

  • @vmars316
    @vmars316 3 года назад

    Do you have a Tutorial 'Create a web browser with Electron' , using browserView , webcontent (not webview) ?
    Thanks

  • @parikshit804
    @parikshit804 5 лет назад

    so, if the target price is less than current price of btc, will the notification fire in every 30 seconds?

  • @WissTune
    @WissTune 10 месяцев назад

    Thank you Gary, @ 31:00 -> I got, "Uncaught ReferenceError: require is not defined" and I did not get the index box!!! Any idea how to solve this?

  • @sumantkanala
    @sumantkanala 6 лет назад

    Hello +DesignCourse, great introductory course.! I was trying to make the notifications work on my windows 10 machine and it doesn't seem to work, when I used the new Notification syntax exactly as you showed. Any suggestions on it would be great.

    • @paulpeeters
      @paulpeeters 6 лет назад +1

      t didn't work for me either. I added package "node-notifier" and called it like this in the function getBTC()
      if (targetPrice.innerHTML != '' && targetPriceVal < cryptos) {
      notifier.notify({
      title: 'BTC Alert',
      message: 'BTC just beat your target price!',
      icon: path.join(__dirname, '../assets/icons/btc.ico'),
      sound: true,
      wait: false
      })
      }
      This works but I still have to change the logic such that a notification is only sent once

    • @sumantkanala
      @sumantkanala 6 лет назад

      Thanks man. Appreciate it!

  • @ahmadfathy8046
    @ahmadfathy8046 4 года назад

    Hello! I followed the steps in the video but the one thing that won't work is the icon load. The packager uses the default one despite having a different icon in the path.

  • @tiptail
    @tiptail 3 года назад

    Great Video... setup worked nicely on my Mac. However, at 14:38, I am unable to get a menu to show on my MacBook. I'm reading the documentation on Menus but it's not solving my issues. I'd love an updated video and Mac support!
    and any help to create a menu. Thanks!

    • @tiptail
      @tiptail 3 года назад

      This works on my MacBook:
      // Mac App menu - used for styling so shortcuts work
      if (process.platform === 'darwin') {
      // Create our menu entries so that we can use MAC shortcuts
      const template = [
      {
      label: 'File', submenu: [
      { role: 'quit' },
      ],
      },
      {
      label: 'Edit', submenu: [
      { role: 'undo' },
      { role: 'redo' },
      { role: 'separator' },
      { role: 'cut' },
      { role: 'copy' },
      { role: 'paste' },
      { role: 'pasteandmatchstyle' },
      { role: 'delete' },
      { role: 'selectall' },
      ],
      },
      {
      label: 'Help', submenu: [
      { role: 'reload' },
      { role: 'toggleFullScreen' },
      { role: 'toggleDevTools' },
      ],
      },
      ];
      Menu.setApplicationMenu(Menu.buildFromTemplate(template));
      }

    • @ABHI-ml4ip
      @ABHI-ml4ip 2 года назад

      Actually on Mac the menu is not on the window itself but on the top of desktop.