{"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\/ro\/blog\/news\/redbean-2-0-platforma-dlya-web-prilozhenij-upakovannyh-v-universalnyj-ispolnyaemyj-zip-arhiv","title":{"rendered":"Redbean 2.0 \u2014 o platform\u0103 pentru aplica\u021bii web, pachetizat\u0103 \u00eentr-un arhiv ZIP executabil universal","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>A fost lansat\u0103 versiunea proiectului Redbean 2.0, care ofer\u0103 un server web ce permite livrarea aplica\u021biilor web sub forma unui fi\u0219ier executable universal, care poate fi rulat pe Linux, Windows, MacOS, FreeBSD, NetBSD \u0219i OpenBSD. Toate resursele legate de aplica\u021bia web \u0219i server sunt comprimate \u00eentr-un singur fi\u0219ier executabil, care este compatibil cu formatul arhivelor ZIP \u0219i permite utilizarea utilitarului zip pentru ad\u0103ugarea de fi\u0219iere suplimentare. Capacitatea de a rula un singur fi\u0219ier pe diferite sisteme de operare \u0219i de a fi recunoscut ca arhiv\u0103 ZIP este realizat\u0103 prin manipularea capetelor fi\u0219ierelor executabile \u0219i legarea cu biblioteca standard multi-platform\u0103 Cosmopolitan. Codul proiectului este distribuit sub licen\u021ba ISC.      <\/p>\n<p>Ideea proiectului const\u0103 \u00een livrarea unui fi\u0219ier executabil \"redbean.com\" cu un server web \u00eencorporat. Dezvoltatorul aplica\u021biei web poate utiliza utilitarul zip pentru a ad\u0103uga \u00een acest fi\u0219ier fi\u0219iere HTML \u0219i Lua, ob\u021bin\u00e2nd, \u00een acest mod, o aplica\u021bie web autonom\u0103, func\u021bional\u0103 pe toate sistemele de operare populare, f\u0103r\u0103 a necesita un server web separat pentru func\u021bionare.         <\/p>\n<p>Dup\u0103 lansarea fi\u0219ierului executabil ob\u021binut, pentru a accesa aplica\u021bia web salvat\u0103 \u00een fi\u0219ier se utilizeaz\u0103 serverul web \u00eencorporat. \u00cen mod implicit, handler-ul este ata\u0219at la localhost, dar serverul poate fi folosit \u0219i ca un server web public obi\u0219nuit (de exemplu, acest server g\u0103zduie\u0219te site-ul proiectului). Serverul web \u00eencorporat suport\u0103 accesul prin HTTPS \u0219i poate fi rulat cu izolarea sandbox, permi\u021b\u00e2nd controlul asupra interfe\u021belor sistemului la care se face apel. Pentru a gestiona func\u021bionarea serverului \u00een timpul execut\u0103rii, este oferit un interface interactiv REPL (bazat pe Lua REPL \u0219i biblioteca bestline, un echivalent GNU Readline), care permite modificarea st\u0103rii procesului \u00een mod interactiv.      <\/p>\n<p>Se sus\u021bine c\u0103 serverul web poate gestiona peste un milion de solicit\u0103ri pe secund\u0103 pe un PC obi\u0219nuit, livr\u00e2nd con\u021binut comprimat prin metoda gzip. Performan\u021ba ridicat\u0103 se datoreaz\u0103 faptului c\u0103 zip \u0219i gzip folosesc un format comun, astfel \u00eenc\u00e2t datele sunt transmise f\u0103r\u0103 recompresie din zonele deja comprimate ale fi\u0219ierului zip. \u00cen plus, deoarece fi\u0219ierul executabil a fost creat folosind leg\u0103tura static\u0103 \u0219i are o dimensiune mic\u0103, apelul func\u021biei fork pentru acesta nu genereaz\u0103 practic cheltuieli suplimentare atunci c\u00e2nd este plasat \u00een memorie.       <\/p>\n<p>Pe l\u00e2ng\u0103 procesarea con\u021binutului web static \u0219i execu\u021bia JavaScript \u00een browser, logica aplica\u021biei web poate fi extins\u0103 cu ajutorul scripturilor \u00een limbajul Lua, framework-ului web Fullmoon \u0219i bazei de date SQLite. Printre func\u021bionalit\u0103\u021bile suplimentare se num\u0103r\u0103 suportul pentru schema de hash pentru parole argon2, posibilitatea de a determina regiunea IP din baza MaxMind \u0219i accesul la API-ul Unix al bibliotecii Cosmopolitan. Dimensiunea stivei de baz\u0103, care include serverul web, MbedTLS, Cosmopolitan, Lua \u0219i SQLite, este de doar 1.9 MB.     <\/p>\n<p>Fi\u0219ierul executabil universal este generat prin combinarea segmentelor \u0219i anteturilor specifice pentru diferite sisteme de operare (PE, ELF, MACHO, OPENBSD, ZIP) \u00eentr-un singur fi\u0219ier. Pentru a permite rularea unui singur fi\u0219ier executabil pe sistemele Windows \u0219i Unix, se aplic\u0103 o metod\u0103 ce const\u0103 \u00een codificarea fi\u0219ierelor Windows PE sub forma unui script shell, av\u00e2nd \u00een vedere c\u0103 Thompson Shell nu utilizeaz\u0103 marcatorul de scripturi \"#!\". \u00cen final, se creeaz\u0103 un fi\u0219ier executabil \u00een care sunt combinate mai multe formate diferite utilizate \u00een Linux, BSD, Windows \u0219i 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;: waiting for command\u2026 $ 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 \/>Sursa: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=57407\">opennet.ro<\/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.1 - 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\/ro\/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.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"ro_RO\" \/>\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\/ro\/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 platform\u0103 pentru aplica\u021bii web, ambalate \u00eentr-un arhiv ZIP executabil universal | ProHoster","description":"A fost lansat\u0103 versiunea proiectului Redbean 2.0, care ofer\u0103 un server web capabil s\u0103 furnizeze aplica\u021bii web sub forma unui fi\u0219ier executabil universal, care poate fi rulat pe Linux, Windows, MacOS, FreeBSD, NetBSD.","canonical_url":"https:\/\/prohoster.info\/ro\/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":"ro_RO","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\/ro\/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\/ro\/wp-json\/wp\/v2\/posts\/104506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/comments?post=104506"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/104506\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/media?parent=104506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/categories?post=104506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/tags?post=104506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}