{
    "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript",
    "locale": "en",
    "title": "Node.js and JavaScript · DeLaParra Services",
    "description": "Install Node.js and npm, install a project’s packages, and run the app locally.",
    "alternates": {
        "en": "https://delaparra-services.nl/manuals/nodejs-en-javascript",
        "nl": "https://delaparra-services.nl/nl/handleidingen/nodejs-en-javascript"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/manuals/nodejs-en-javascript.csv",
        "md": "https://delaparra-services.nl/manuals/nodejs-en-javascript.md",
        "json": "https://delaparra-services.nl/manuals/nodejs-en-javascript.json",
        "zip": "https://delaparra-services.nl/manuals/nodejs-en-javascript.zip",
        "pdf": "https://delaparra-services.nl/manuals/nodejs-en-javascript.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript.csv",
            "encodingFormat": "text/csv",
            "name": "nodejs-en-javascript.csv"
        },
        {
            "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript.json",
            "encodingFormat": "application/json",
            "name": "nodejs-en-javascript.json"
        },
        {
            "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript.md",
            "encodingFormat": "text/markdown",
            "name": "nodejs-en-javascript.md"
        },
        {
            "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript.pdf",
            "encodingFormat": "application/pdf",
            "name": "nodejs-en-javascript.pdf"
        },
        {
            "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript.zip",
            "encodingFormat": "application/zip",
            "name": "nodejs-en-javascript.zip"
        }
    ],
    "markdown": "Install Node.js and npm, install a project’s packages, and run the app locally.\n\n## WHAT IT IS | JavaScript on your computer.\n\nJavaScript is the language that runs in your browser. With Node.js, JavaScript also runs on your computer. Almost every modern website uses Node.js to prepare files for the browser. With Node.js, you also get **npm**, the programme you use to install packages.\n\nAlways choose an **LTS** version. LTS means that version will receive updates for a long time.\n\n### 01 / Windows\n\nOpen PowerShell via the Start menu and run the following:\n\n```\nwinget install --id OpenJS.NodeJS.LTS -e\n```\n\nClose PowerShell and open it again. Check:\n\n```\nnode --version\nnpm --version\n```\n\n## LINUX | Installing with nvm.\n\nThe version of Node.js in Ubuntu and Debian is often too old. That’s why, on Linux, you should first install nvm, a programme that manages the correct version of Node.js for you.\n\n### 02 / Installing nvm\n\nGo to github.com/nvm-sh/nvm and copy the installation command under **Installing and Updating**. It looks like this (the version number may be different):\n\n```\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash\n```\n\nClose the terminal and open it again.\n\n### 03 / Installing Node.js\n\n```\nnvm install --lts\nnode --version\n```\n\n### 04 / Fedora and Arch\n\nIn that case, the version from the system’s own package manager is usually recent enough.\n\n**Fedora**\n```\nsudo dnf install nodejs\n```\n\n**Arch Linux**\n```\nsudo pacman -S nodejs npm\n```\n\n## A PROJECT | Installing packages.\n\n### 05 / package.json\n\nThere is usually a file called `package.json` in your project folder. This file lists the packages your app requires.\n\n### 06 / Install everything\n\nOpen the terminal in your project folder:\n\n```\nnpm install\n```\n\nnpm creates a folder called `node_modules`. It’s large and shouldn’t be included in Git.\n\n### 07 / Launching the app\n\nThe available commands are listed in `package.json` under **scripts**. Usually, they are:\n\n```\nnpm run dev\n```\n\nYou will then see an address such as http://localhost:5173.. Open that in your browser. To stop it, press **Ctrl + C**.\n\n### 08 / Building for the live site\n\n```\nnpm run build\n```\n\n## WORKING WITH AI | Ask your assistant.\n\n### 09 / A task for your AI assistant\n\n\"Check which version of Node.js this project requires, install the packages and run the app locally. Ask for permission before adding new packages.\"\n\n### 10 / TypeScript\n\nDo you see any files ending in `.ts`? That’s TypeScript: JavaScript with extra checks for typing errors. You don’t need to install anything separately; `npm install` takes care of that.\n\n**Good to know**\nAdd `node_modules/` to the `.gitignore` file. Don’t just add packages suggested by your AI assistant. First, ask what the package does and whether it is being maintained.\n\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "TechArticle",
                "@id": "https://delaparra-services.nl/manuals/nodejs-en-javascript#article",
                "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript",
                "headline": "Node.js and JavaScript",
                "description": "Install Node.js and npm, install a project’s packages, and run the app locally.",
                "inLanguage": "en",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/manuals/nodejs-en-javascript#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/manuals/nodejs-en-javascript#dataset",
                "name": "Node.js and JavaScript",
                "description": "Install Node.js and npm, install a project’s packages, and run the app locally.",
                "url": "https://delaparra-services.nl/manuals/nodejs-en-javascript",
                "identifier": "https://delaparra-services.nl/manuals/nodejs-en-javascript#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/manuals/nodejs-en-javascript#article"
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "DeLaParra Services",
                    "url": "https://delaparra-services.nl/"
                },
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/manuals#dataset",
                    "name": "Manuals for working on your own app",
                    "url": "https://delaparra-services.nl/manuals"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "nodejs-en-javascript.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/manuals/nodejs-en-javascript.csv",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "nodejs-en-javascript.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/manuals/nodejs-en-javascript.json",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "nodejs-en-javascript.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/manuals/nodejs-en-javascript.md",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "nodejs-en-javascript.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/manuals/nodejs-en-javascript.pdf",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "nodejs-en-javascript.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/manuals/nodejs-en-javascript.zip",
                        "inLanguage": "en"
                    }
                ]
            }
        ]
    }
}