The Laptop Store is a project based completely on back end code in Node.js. The server-side script is executed, the browser makes requests and accordingly the page is updated.
To run the project:
- Upload the index.js and associated files on a server(eg. localhost: 127.0.0.1:)
- Reload the page to make initial request to server to send HTML.
- The page is available to view in client's browser.
- The various options on the page uses appropriate routing to the server.
Node.js is a JavaScript Runtime Environment based on Google's open-source V8 engine. It is used to execute JavaScript on the server side, reducing the execution on the client's side and also obeying data security as the complete code is not available to the client side.
Node.js uses a single thread, even for a million users. So, it was important to use all the synchronous functions carefully.