Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Demonstrates a simple NW.js app with a Todo list, adding tasks and displaying them using HTML, CSS, and JavaScript with Node.js integration.
// package.json
{
"name": "todo-app",
"main": "index.html",
"window": { "title": "Todo App", "width": 800, "height": 600 }
}
// index.html
<!DOCTYPE html>
<html>
<body>
<h1>Todo App</h1>
<input id='todoInput' placeholder='New Todo'/>
<button id='addBtn'>Add</button>
<ul id='todoList'></ul>
<script>
const addBtn = document.getElementById('addBtn');
const input = document.getElementById('todoInput');
const list = document.getElementById('todoList');
addBtn.addEventListener('click', () => {
if(input.value.trim()){
const li = document.createElement('li');
li.textContent = input.value;
list.appendChild(li);
input.value = '';
}
});
</script>
</body>
</html>NW.js (previously known as Node-Webkit) is an open-source framework for building desktop applications using web technologies (HTML, CSS, JavaScript) with full access to Node.js APIs.
Origin & Creator
Developed by Intel’s Open Source Technology Center in 2011 (originally as Node-Webkit) to enable web developers to build desktop applications easily.
Industrial Note
NW.js is popular for desktop apps that need a web-like interface, rapid prototyping, or access to Node.js modules in a desktop environment.