{"id":104506,"date":"2022-06-25T15:36:47","date_gmt":"2022-06-25T13:36:47","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv"},"modified":"2022-06-25T15:36:47","modified_gmt":"2022-06-25T13:36:47","slug":"redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","title":{"rendered":"Redbean 2.0 \u2014 una plataforma para aplicaciones web empaquetadas en un archivo ZIP ejecutable universal","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Se presenta la versi\u00f3n 2.0 del proyecto Redbean, que ofrece un servidor web que permite distribuir aplicaciones web en forma de un archivo ejecutable \u00fanico, que puede ejecutarse en Linux, Windows, MacOS, FreeBSD, NetBSD y OpenBSD. Todos los recursos relacionados con la aplicaci\u00f3n web y el servidor se compilan en un solo archivo ejecutable, que adem\u00e1s es compatible con el formato de archivos ZIP y permite el uso de la utilidad zip para agregar archivos adicionales. La capacidad de ejecutar un solo archivo en diferentes sistemas operativos y su reconocimiento como un archivo ZIP se logra mediante manipulaciones en las cabeceras de archivos ejecutables y la vinculaci\u00f3n con la biblioteca est\u00e1ndar de C multiplataforma Cosmopolitan. El c\u00f3digo del proyecto se distribuye bajo la licencia ISC.      <\/p>\n<p>La idea del proyecto es la entrega de un \u00fanico archivo ejecutable \u00abredbean.com\u00bb con un servidor web incorporado. El desarrollador de la aplicaci\u00f3n web puede, mediante la utilidad zip, a\u00f1adir archivos HTML y Lua a este archivo y obtener como resultado una aplicaci\u00f3n web aut\u00f3noma que se ejecuta en todos los sistemas operativos populares y que no requiere el inicio de un servidor web separado en el sistema.         <\/p>\n<p>Tras ejecutar el archivo ejecutable obtenido, se utiliza un servidor web integrado para acceder a la aplicaci\u00f3n web guardada en el archivo. Por defecto, el manipulador se conecta a localhost, pero el servidor tambi\u00e9n puede utilizarse como un servidor web p\u00fablico normal (por ejemplo, este servidor gestiona el sitio del proyecto). El servidor web integrado soporta acceso mediante HTTPS y puede ejecutarse utilizando aislamiento en sandbox, que permite controlar a qu\u00e9 interfaces del sistema se realiza el acceso. Para gestionar el funcionamiento del servidor durante su ejecuci\u00f3n, se proporciona una interfaz interactiva REPL (basada en Lua REPL y en la biblioteca bestline, un an\u00e1logo de GNU Readline), que permite modificar el estado del proceso en modo interactivo.      <\/p>\n<p>Se afirma que el servidor web puede manejar m\u00e1s de un mill\u00f3n de solicitudes por segundo en una PC normal, entregando contenido comprimido con el m\u00e9todo gzip. La alta eficiencia se debe a que zip y gzip utilizan un formato com\u00fan, por lo que los datos se entregan sin necesidad de descomprimir desde \u00e1reas ya comprimidas en el archivo zip. Adem\u00e1s, dado que el archivo ejecutable se cre\u00f3 utilizando enlace est\u00e1tico y tiene un tama\u00f1o peque\u00f1o, la llamada a la funci\u00f3n fork no genera pr\u00e1cticamente ning\u00fan costo adicional al estar en memoria.       <\/p>\n<p>Adem\u00e1s de procesar contenido web est\u00e1tico y ejecutar JavaScript en el navegador, la l\u00f3gica de la aplicaci\u00f3n web se puede ampliar mediante scripts en el lenguaje Lua, el marco web Fullmoon y la base de datos SQLite. Entre las caracter\u00edsticas adicionales se encuentra el soporte para el esquema de hash de contrase\u00f1as argon2, la capacidad de determinar la regi\u00f3n IP mediante la base de datos de MaxMind, y el acceso a la API de Unix de la biblioteca Cosmopolitan. El tama\u00f1o de la pila base, que incluye el servidor web, MbedTLS, Cosmopolitan, Lua y SQLite, es de solo 1.9 MB.     <\/p>\n<p>El archivo ejecutable universal se forma combinando segmentos y encabezados espec\u00edficos de diferentes sistemas operativos (PE, ELF, MACHO, OPENBSD, ZIP) en un solo archivo. Para garantizar que un \u00fanico archivo ejecutable se ejecute tanto en Windows como en sistemas Unix, se utiliza un truco que consiste en codificar archivos Windows PE como un script de shell, aprovechando el hecho de que Thompson Shell no utiliza el marcador de scripts \u00ab#!\u00bb. Como resultado, se crea un archivo ejecutable que combina varios formatos diferentes utilizados en Linux, BSD, Windows y macOS.         $ curl https:\/\/redbean.dev\/redbean-demo-2.0.7.com &gt;redbean.com     $ chmod +x redbean.com       $ zip redbean.com hello.html     $ zip redbean.com hello.lua        $ .\/redbean.com -vv     I2022-06-23T08:27:14+000767:redbean] (srvr) listen   http:\/\/127.0.0.1:8080     &gt;: esperando orden...       $ curl https:\/\/127.0.0.1:8080\/hello.html     hello          $ printf 'GET \/hello.lua\n\n' | nc 127.0.0.1 8080     hello        <center>  <video id=\"video\"  controls=\"\" style=\"width: 700px; height: 350px; max-width:100%\"><source src=\"https:\/\/storage.googleapis.com\/justine\/redbean2\/redbean-2.0-demo.mp4\" type=\"video\/mp4\"><\/video><\/center>    <\/center><br \/>\n<br \/>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=57407\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD \u0438 OpenBSD. \u0412\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u0432 ZIP \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 zip \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-104506","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Redbean 2.0 \u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 ZIP-\u0430\u0440\u0445\u0438\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-06-25T13:36:47+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-25T13:36:47+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Redbean 2.0 \u2014 plataforma para aplicaciones web empaquetadas en un archivo ZIP ejecutable universal | ProHoster","description":"Se presenta la versi\u00f3n 2.0 del proyecto Redbean, que ofrece un servidor web capaz de entregar aplicaciones web en forma de un archivo ejecutable universal, que se puede ejecutar en Linux, Windows, MacOS, FreeBSD y NetBSD.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Redbean 2.0 \u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 ZIP-\u0430\u0440\u0445\u0438\u0432 | ProHoster","og:description":"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Redbean 2.0, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e web-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 Linux, Windows, MacOS, FreeBSD, NetBSD.","og:url":"https:\/\/prohoster.info\/es\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-06-25T13:36:47+00:00","article:modified_time":"2022-06-25T13:36:47+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"104506","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2022-06-25 13:36:54","updated":"2022-09-28 11:49:08","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/104506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=104506"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/104506\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=104506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=104506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=104506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}