Skip to content

What is Node.js?

Node.js is a JavaScript runtime that runs your code outside the browser, on a server or on your own computer. It uses V8, the JavaScript engine inside Google Chrome, and adds built-in modules for things browsers don't allow, like reading files and listening for network requests. Ryan Dahl introduced Node.js in 2009, and npm, its package manager, now comes bundled with it.

Node handles many connections in a single process. While it waits on a database or the network, it moves on to other work and picks the request back up when the response arrives. This starts a server on port 3000 that answers every request with JSON:

import { createServer } from 'node:http';

createServer((req, res) => {
  res.setHeader('Content-Type', 'application/json');
  res.end(JSON.stringify({ message: 'Hello from Node' }));
}).listen(3000);

Why learn Node.js?

If you already write JavaScript for the browser, Node is the shortest route to the backend, since the language, fetch, promises and async/await all work the way you know. What's new is the server's side of a request: reading the URL and method, checking the data you've been sent, choosing a status code and storing things so they're still there tomorrow. Those ideas carry over to every backend language you might pick up later.

Real projects usually add a framework such as Express for routing, plus a database, so expect to learn a few tools at once. Tools like npm and Vite also run on Node, so you'll use it as a frontend developer even if you never write an API.

Practice Node.js on Frontend Mentor

Frontend Mentor challenges come with a design or product spec and a brief, and you choose the stack. Several work best as full-stack builds, which is where Node comes in.

Interactive comments section makes a good first API: create, read, update and delete comments and replies, store them in a database, and call your endpoints in place of the provided data.json. The Poll creator app brief recommends a full-stack build, since votes from many phones need to reach one server. Expense splitter app needs live exchange rates, and calling the rates API from your server keeps your API key out of the browser.

Start building free

Challenges to practice Node.js with

Every challenge works with any tech stack. These are good ones to build with Node.js, from easiest to hardest.

  • Free

    URL shortening API landing page

    • HTML
    • CSS
    • JS
    • API
    intermediate

    Integrate with the Clean URI link shortening API and play with browser storage in this landing page challenge.

  • Free

    Interactive comments section

    • HTML
    • CSS
    • JS
    intermediate

    This is project will put your JavaScript skills to the test. We provide a JSON file to pull the data, but it's also a perfect project to build as a full-stack CRUD app!

  • Premium

    Poll creator app

    • HTML
    • CSS
    • JS
    intermediate

    Build and deploy a group polling app where voters need no account, can suggest their own options, and results end in a reveal worth sharing.

  • Free

    RSS feed reader

    • HTML
    • CSS
    • JS
    advanced

    Build an RSS feed reader that lets users subscribe to blogs and news sources, organize feeds into categories, and browse articles in a unified timeline.

  • Premium

    Product feedback app

    • HTML
    • CSS
    • JS
    guru

    This will be a perfect portfolio piece! You'll be working with JSON, managing state, and building like a real-world app. You can even create it as a full-stack project!

  • Premium

    Expense splitter app

    • HTML
    • CSS
    • JS
    • API
    guru

    Build and deploy a group expense splitter with flexible splits, multi-currency support via a live exchange-rate API, and clear settlement tracking.

View more challenges

Solutions made with Node.js

View more solutions

Related technologies

  • What is Next.js?

    Next.js is a React framework for full-stack web apps. Its App Router turns folders into routes and renders pages as React Server Components by default.

  • What is TypeScript?

    TypeScript is JavaScript with syntax for types, made by Microsoft. It checks your code before it runs and compiles to plain JavaScript for any browser.

Join 1,205,119 people building portfolio-worthy projects

Our highly supportive, positive community is here to help you improve your skills. We all try to help each other out wherever possible. We’d love to welcome you to our community!

Log in