{"id":21815514,"url":"https://github.com/web-dev-codi/setup-a-local-web-development-environment","last_synced_at":"2025-04-14T00:42:38.828Z","repository":{"id":232572889,"uuid":"784664134","full_name":"Web-Dev-Codi/Setup-a-local-Web-Development-Environment","owner":"Web-Dev-Codi","description":"A detailed guide to setup a full Web development environment with Node.js, and Git for your operating system","archived":false,"fork":false,"pushed_at":"2025-01-21T08:10:19.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T14:52:46.628Z","etag":null,"topics":["backend","bash","config","developer","development","environment","front-end","git","git-credential","github","initial","linux-development","local-development-environment","macos-development","node","nodejs","shell","ssh","windows","windows-development"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Web-Dev-Codi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-10T09:55:36.000Z","updated_at":"2025-01-21T08:10:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ef33dfa-3a3d-4616-a3b9-dd0300e0895e","html_url":"https://github.com/Web-Dev-Codi/Setup-a-local-Web-Development-Environment","commit_stats":null,"previous_names":["web-dev-codi/github-initial-setup","web-dev-codi/local-development-environment-setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-Dev-Codi%2FSetup-a-local-Web-Development-Environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-Dev-Codi%2FSetup-a-local-Web-Development-Environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-Dev-Codi%2FSetup-a-local-Web-Development-Environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-Dev-Codi%2FSetup-a-local-Web-Development-Environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Web-Dev-Codi","download_url":"https://codeload.github.com/Web-Dev-Codi/Setup-a-local-Web-Development-Environment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804718,"owners_count":21164127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","bash","config","developer","development","environment","front-end","git","git-credential","github","initial","linux-development","local-development-environment","macos-development","node","nodejs","shell","ssh","windows","windows-development"],"created_at":"2024-11-27T15:19:29.690Z","updated_at":"2025-04-14T00:42:38.820Z","avatar_url":"https://github.com/Web-Dev-Codi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setting up a local development environment with Node.js and Git\n\n## Install Node.js on Linux, Windows, and MacOS using ([nvm](https://github.com/nvm-sh/nvm))\n\nnvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and [windows WSL](https://github.com/nvm-sh/nvm#important-notes).\n\n\n## Installing NVM\n\nTo **install** or **update** nvm, you should use the following cURL(for Linux, and MacOS) or Wget ( for Windows Powershell users) command:\n\n```sh\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\n```\n\n```sh\nwget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\n```\n\nRunning either of the above commands downloads a script and runs it. The script clones the nvm repository to `~/.nvm`, and attempts to add the source lines from the snippet below to the correct profile file (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).\n\n\n```sh\nexport NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] \u0026\u0026 printf %s \"${HOME}/.nvm\" || printf %s \"${XDG_CONFIG_HOME}/nvm\")\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\" # This loads nvm\n```\n\n### Verify Installation\n\n###### Reload your terminal, than check if nvm is installed properly\n\nTo verify that nvm has been installed, do:\n\n```sh\ncommand -v nvm\n```\n\nor \n\n```sh\nnvm -v # to see the version number example: 0.39.3\n```\n\nIf you want to see what versions are available to install:\n\n```sh\nnvm ls-remote\n```\n\nTo install a specific version of node:\n\n```sh\nnvm install 14.7.0 # or 16.3.0, 12.22.1, etc\n```\n\nTo install the Long-term Support (A.K.A Stable version) of node:\n\n```sh\nnvm install --lts\n```\n\n## Setting up Node.js on Windows\n\n##### In Powershell\n\n```sh\n# installs fnm (Fast Node Manager)\nwinget install Schniz.fnm\n\n# download and install Node.js\nfnm use --install-if-missing 20\n\n# verifies the right Node.js version is in the environment\nnode -v # should print `v20.14.0`\n\n# verifies the right NPM version is in the environment\nnpm -v # should print `10.7.0`\n```\n\nor download the windows installer via ([Node Windows installer](https://nodejs.org/en/download/prebuilt-installer)) and follow install instructions\n\nTo verify that Node.js has been installed properly, in your shell type the following command:\n\n```sh\nnode --version\n```\n\n## Setting up git on Linux\n\nIn your terminal type in the command that matches your linux distribution\nFor administrator privileges be sure to use `sudo`\n\n### Debian/Ubuntu\n\nFor the latest stable version for your release of Debian/Ubuntu\n\n```sh\napt-get install git\n```\n\nFor Ubuntu, this PPA provides the latest stable upstream Git version\n\n```sh\nadd-apt-repository ppa:git-core/ppa \n\napt update\n\napt install git\n```\n\n### Fedora\n\n##### (up to Fedora 21)\n\n```sh\nyum install git\n```\n\n##### (Fedora 22 and later)\n\n```sh\ndnf install git\n```\n\n### Gentoo\n\n```sh\nemerge --ask --verbose dev-vcs/git\n```\n\n### Arch Linux\n\n```sh\npacman -S git\n```\n\n### openSUSE\n\n```sh\nzypper install git\n```\n\n### Mageia\n\n```sh\nurpmi git\n```\n\n### Nix/NixOS\n\n```sh\nnix-env -i git\n```\n\n### FreeBSD\n\n```sh\npkg install git\n```\n\n### Solaris 9/10/11 ([OpenCSW](https://www.opencsw.org/))\n\n```sh\npkgutil -i git\n```\n\n### Solaris 11 Express\n\n```sh\npkg install developer/versioning/git\n```\n\n### OpenBSD\n\n```sh\npkg_add git\n```\n\n### Alpine\n\n```sh\napk add git\n```\n\n## Setting up git on Windows 10/11\n\n#### Install the standalone .exe\n\n**[32-bit Git for Windows Setup](https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-32-bit.exe).**\n\n**[64-bit Git for Windows Setup](https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe).**\n\n### Check your git installation in the terminal\n\n```sh\ngit --version\n```\n\n### Setting up git credentials via the terminal\n\nIn your terminal type these commands **without quotes**\n\nEnter your Github user name\n\n```sh\ngit config --global user.name \"Your Github User Name Here\"\n```\n\nEnter the email you used to sign-up for GitHub (**Very Important**)\n\n```sh\ngit config --global user.email \"your@email.com\"\n```\n\nChange the name of the master branch to main (Very Important)\n\n```sh\ngit config --global init.defaultBranch main\n```\n\nEnter in terminal to see the config\n\n```sh\ngit config --list\n```\n\nThe terminal should look something like this\n\n```sh\ngit config --list\nuser.name=Your Github User Name Here\nuser.email=your@email.com\ninit.defaultbranch=main\n```\n\n# Generating an SSH key\n\nRemain in the terminal and enter these commands\n\n```sh\nssh-keygen -t ed25519 -C yourgithub@email.com\n```\n\nHit Enter until the process is done\n\nIn the terminal open the file id_ed25519.pub inside the .ssh directory within your Home directory with the following command.\n\n```sh\ncat id_ed25519.pub\n```\n\ncopy paste the code to your github account by adding the ssh key [here](https://github.com/settings/keys)\n\nClick New ssh key button\n![alt text](sshbutton.png)\nFill out the required fields and click the add ssh key button\n![alt text](newsshsubmit.png)\n\nOnce the ssh key is added, create a repository on [GitHub](https://github.com), clone it, add files, commit and push. When you try to push the repository a popup with ask to add your system to github fully type `yes`, and hit `ENTER`.\n\nHave fun and enjoy your new development environment.\n\nSpecial thanks to nvm, Node.js, and git for helping me with the detailed information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-dev-codi%2Fsetup-a-local-web-development-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-dev-codi%2Fsetup-a-local-web-development-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-dev-codi%2Fsetup-a-local-web-development-environment/lists"}