Node.js NotesNode.js Project Home Page What is Node.js?Node.js is a JavaScript runtime, which means you can use it to execute JavaScript outside the browser. It's essentially Javascript running on the server. It's an Open Source server environment that runs JavaScript; this means you can run JavaScript on a machine and not just in the browser. A Javascript runtime for servers. Is fast and efficient. Uses an event-driven non-blocking I/O model - operates on single thread, can handle tens of thousands of connections concurrently. Uses an Event listener. Compare this to PHP where each connection spawns a new thread and takes up system memory, and eventually maxes out the maximum memory load. How to See if Node is InstalledTo see if node is installed: cmd prompt / node -v To see if npm is installed: cmd prompt / npm -v npm is Node Package Manager, allows you to install packages and modules for Node. Create a Basic Web Serverhttps://youtu.be/U8XF6AFGqlc?t=993 npm initCreates a package.json file. https://www.youtube.com/watch?time_continue=924&v=U8XF6AFGqlc Command LineC:/Program Files/nodejs/node.exe This is a command line where you can run JavaScript. GetElementById does not work because this is JavaScript without the browser. ExpressWeb development framework. npm - Node.js Package ManagerUsed to install node modules/programs.
Visit LowPrices.co.uk for Your UK Shopping
|
|
All Content ©2020 WebRef.eu |