An example of a command line tool is cURL, which stand for client URL and is used to download content from an internet URL. CURL se usa a menudo para instalar componentes como Node.js o, en nuestro caso, un administrador de versiones de Node.js. CURL is often used to install things like Node.js or, in our case, a Node.js version manager. Using Apple® Mac® OS X This document explains the process of importing your digital certificate for use in Mac OS X with Mozilla® Firefox and/or Safari. Mozilla Firefox To import your digital certificate for use in another browser or on a different device when using Mozilla Firefox, please use these instructions.
Si no está familiarizado con Node.js, esta guía le ayudará a conocer algunos aspectos básicos.If you're brand new to using Node.js, this guide will help you to get started with some basics.
Requisitos previosPrerequisites
En esta guía se da por supuesto que ya ha completado los pasos para configurar el entorno de desarrollo de Node.js en Windows nativo, que incluyen:This guide assumes that you've already completed the steps to set up your Node.js development environment on native Windows, including: How to download photots from iphone to mac.
La instalación de Node.js directamente en Windows es la manera más sencilla de empezar a realizar operaciones básicas de Node.js con la mínima configuración.Installing Node.js directly on Windows is the most straightforward way to get started performing basic Node.js operations with a minimal amount of set up.
Cuando esté listo para usar Node.js para desarrollar aplicaciones para producción, lo que suele implicar la implementación en un servidor Linux, se recomienda que configure el entorno de desarrollo de Node.js con WSL2.Once you are ready to use Node.js to develop applications for production, which typically involves deploying to a Linux server, we recommend that you set up your Node.js development environment with WSL2.Aunque es posible implementar aplicaciones web en servidores Windows, es mucho más común usar servidores Linux para hospedar las aplicaciones de Node.js.Though it's possible to deploy web apps on Windows servers, it is much more common to use Linux servers to host your Node.js apps.
Tipos de aplicaciones de Node.jsTypes of Node.js applications
Node.js es un entorno de tiempo de ejecución de JavaScript que se usa principalmente para crear aplicaciones web.Node.js is a JavaScript runtime primarily used for creating web applications.Dicho de otro modo, se trata de una implementación del lado servidor de JavaScript que se usa para escribir el back-end de una aplicación.Put another way, it's a server-side implementation of JavaScript used for writing the backend of an application.(No obstante, muchos marcos de Node.js también pueden controlar el front-end). Estos son algunos ejemplos de lo que puede crear con Node.js.(Though many Node.js frameworks can also handle the frontend.) Here are a few examples of what you might create with Node.js.
Intente usar Node.js en VS CodeTry using Node.js in VS Code
Ten en cuenta que, al escribir
console en el archivo 'app.js', VS Code muestra las opciones admitidas relacionadas con el objeto console que puedes elegir al usar IntelliSense.Notice that when you type console in your 'app.js' file, VS Code displays supported options related to the console object for you to choose from using IntelliSense.Intenta experimentar con IntelliSense utilizando otros objetos de JavaScript.Try experimenting with Intellisense using other JavaScript objects.
Sugerencia
Prueba el nuevo terminal de Windows si tienes previsto usar varias líneas de comandos (Ubuntu, PowerShell, símbolo del sistema de Windows, etc.) o si quieres personalizar el terminal, incluido el texto, los colores de fondo, los enlaces de teclado, los paneles de varias ventanas, etc.Try the new Windows terminal if you plan to use multiple command lines (Ubuntu, PowerShell, Windows Command Prompt, etc) or if you want to customize your terminal, including text, background colors, key bindings, multiple window panes, etc.
Configuración de un marco de aplicación web básico mediante ExpressSet up a basic web app framework by using Express
Express es un marco de trabajo de Node.js minimalista, flexible y simplificado que facilita el desarrollo de una aplicación web capaz de administrar varios tipos de solicitudes, como GET, PUT, POST y DELETE.Express is a minimal, flexible, and streamlined Node.js framework that makes it easier to develop a web app that can handle multiple types of requests, like GET, PUT, POST, and DELETE.Express incluye un generador de aplicaciones que creará automáticamente una arquitectura de archivos para la aplicación.Express comes with an application generator that will automatically create a file architecture for your app.
Para crear un proyecto con Express.js:To create a project with Express.js:
Nota
Aquí usamos el comando
npx para ejecutar el paquete de Node Express.js sin instalarlo realmente (o bien instalándolo temporalmente en función de cómo quieras imaginarlo).We are using the npx command here to execute the Express.js Node package without actually installing it (or by temporarily installing it depending on how you want to think of it).Si intentas usar el comando express o comprobar la versión de Express instalada mediante express --version , recibirás una respuesta que te indicará que no se encuentra Express.If you try to use the express command or check the version of Express installed using: express --version , you will receive a response that Express cannot be found.Si quieres instalar Express de forma global para usarlo una y otra vez, utiliza npm install -g express-generator .If you want to globally install Express to use over and over again, use: npm install -g express-generator .Puedes ver una lista de los paquetes que ha instalado npm mediante npm list .You can view a list of the packages that have been installed by npm using npm list .Se mostrarán por profundidad (el número de directorios anidados en profundidad).They'll be listed by depth (the number of nested directories deep).Los paquetes que has instalado estarán en la profundidad 0.Packages that you installed will be at depth 0.Las dependencias de ese paquete estarán en la profundidad 1, las más dependencias más alejadas en la profundidad 2, y así sucesivamente.That package's dependencies will be at depth 1, further dependencies at depth 2, and so on.Para más información, consulta el artículo sobre la diferencia entre npx y npm en Stackoverflow.To learn more, see Difference between npx and npm? on Stackoverflow.
Sugerencia
La parte
DEBUG=myapp:* del comando anterior significa que estás indicando a Node.js que desea activar el registro con fines de depuración.The DEBUG=myapp:* part of the command above means you are telling Node.js that you want to turn on logging for debugging purposes.No olvides reemplazar 'myapp' por el nombre de la aplicación.Remember to replace 'myapp' with your app name.Puedes encontrar el nombre de la aplicación en el archivo package.json bajo la propiedad 'name'.You can find your app name in the package.json file under the 'name' property.Al usar npx cross-env se establece la variable de entorno DEBUG en cualquier terminal, pero también se puede establecer con la forma específica del terminal.Using npx cross-env sets the DEBUG environment variable in any terminal, but you can also set it with your terminal specific way.El comando npm start indica a npm que ejecute los scripts en el archivo package.json .The npm start command is telling npm to run the scripts in your package.json file.
Prueba con un módulo de Node.jsTry using a Node.js module
Node.js tiene herramientas que te ayudan a desarrollar aplicaciones web del lado servidor, algunas integradas y muchas más disponibles a través de npm.Node.js has tools to help you develop server-side web apps, some built in and many more available via npm.Estos módulos pueden ayudar con muchas tareas:These modules can help with many tasks:
Vamos a usar el módulo de sistema operativo integrado para obtener información sobre el sistema operativo del equipo:Let's use the built-in OS module to get some information about your computer's operating system:
Pasos siguientesNext steps
En esta guía, has aprendido algunas cosas básicas sobre lo que puedes hacer con Node.js, has probado la línea de comandos de Node.js en VS Code, has creado una aplicación web simple con Express.js y la has ejecutado localmente en el explorador web. Después has intentado usar algunos de los módulos de Node.js integrados.In this guide, you learned a few basic things about what you can do with Node.js, tried using the Node.js command line in VS Code, created a simple web app with Express.js and ran it locally in your web browser, and then tried using a few of the built-in Node.js modules.Para obtener más información sobre cómo instalar y usar algunos marcos web de Node.js populares, consulta la guía siguiente, en la que se trata el Next.js (un marco web representado por el servidor basado en React), Nuxt.js (un marco web representado por el servidor basado en Vue) y Gatsby (un marco web representado de forma estática basado en React).To learn more about how to install and use some popular Node.js web frameworks, continue to the next guide which covers Next.js (a server-rendered web framework based on React), Nuxt.js (a server-rendered web framework based on Vue), and Gatsby (a statically-rendered web framework based on React).También puedes ir directamente al aprendizaje sobre el uso de bases de datos de MongoDB o PostgreSQL o contenedores de Docker.You can also skip to learning about how to work with MongoDB or PostgreSQL databases or Docker containers.
Getting Started
After installing and starting the service (which happens automatically on most platforms) your device will generate a ZeroTier address. This is a ten-digit address that looks like
89e92ceee5 .
To actually connect to anything you will need to join a network. These have 16-digit network IDs that look like
8056c2e21c000001 . You can get a network ID from someone else or you can create your own network at my.zerotier.com.
Mac and Windows platforms have graphical interfaces that provide tray or task bar icons. All platforms have the
zerotier-cli command line interface. Use zerotier-cli help to get help. On Unix-like systems you may need to preface this with sudo , while on Windows you will need to use an administrator-mode command prompt.
A more detailed Getting Started is available at our Knowledge Base.
Visit our community chat for live help. Download Links
Latest Version: 1.4.6 / Release Notes
Microsoft WindowsMSI Installer (x86/x64)
Be sure to approve installation of the driver during the install process.
Windows 7 and Windows Server 2012 or later are supported. Cyber monday mac apps. It may work on Vista and Server 2008 but no support will be offered on these. If you are installing via a remote desktop session read this knowledge base entry.
MacOSMacOS PKG Installer
MacOS 10.10 or newer is supported. The following commands can be used from the terminal to control, restart, or uninstall the service.
Apple iOSGet in App Store
The iOS App runs on iOS 10 or newer.
AndroidGet in Google Play Store
The app should work on Android 4.0.3 or newer, though more recent versions are recommended. LineageOS may have issues and unfortunately we’re not able to duplicate or debug them.
The apk is also available for download
Linux (DEB/RPM)
Debian and RPM based distributions including Debian, Ubuntu, CentOS, RHEL, Fedora, and others are supported via a script that adds the right repository and installs the package.
If you’re willing to rely on SSL to authenticate the site, a one line install can be done with:
Como Usar Node En Terminal.app En Browser Mac Download
If you have GPG installed, a more secure option is available:
After using the script, use apt or yum to manage future updates to zerotier-one
Other Linux distributions may have their own packages. If not try building and installing from source.
FreeBSDFreeBSD Package
The FreeBSD package is created and supported by the FreeBSD community and not by ZeroTier, Inc. Contact the package maintainer to report packaging related bugs.
Synology NAS
ZeroTier One for Synology NAS is designed for DSM 6+ and can be installed on any ARM, x86, or x64 based Synology NAS device. Once installed you can join virtual networks from the ZeroTier One web UI. Currently setup via QuickConnect is not supported. Check the ZeroTierNAS repository for more information.
QNAP NAS
Packages are available for x86, x64, and several ARM variants. Once installed ZeroTier can be controlled from the command line. Check the ZeroTierNAS repository for more information.
WD MyCloud NAS
ZeroTier One for Western Digital MyCloud EX2/4/Ultra NAS and personal cloud devices, with packages at download.zerotier.com. Once installed you can join virtual networks from the ZeroTier One command line interface. See the ZeroTierNAS repository for more information.
OthersCommunity OpenWRT PortComo Usar Node En Terminal.app En Browser Mac Os
Community ports are not supported directly by ZeroTier, Inc. Contact the maintainer of the port for help or to report port-specific bugs.
Docker
The repository contains a Dockerfile that can be used to create a containerized ZeroTier for use with pure container-only Linux distributions.
Open SourceComo Usar Node En Terminal.app En Browser Mac OsZeroTier One on GitHub
ZeroTier One can be compiled easily from source for use on OSes other than those that we support via pre-built packages. This includes less common versions of Linux, older FreeBSD, OpenBSD, NetBSD, etc.
App Embedding / SDK (libzt)libzt on GitHubComo Usar Node En Terminal.app En Browser Mac 10libzt downloads
The libzt project combines our network virtualization engine with a lightweight user-space TCP/IP stack and a Posix-compliant network API. The result can be built into an application as a library, allowing it to access virtual networks without elevated permissions or special OS access to create tun/tap ports.
Older Versions
Older versions of ZeroTier can be found here.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |