{"id":13496775,"url":"https://github.com/swifweb/webber","last_synced_at":"2025-10-12T07:00:34.198Z","repository":{"id":59096069,"uuid":"339102371","full_name":"swifweb/webber","owner":"swifweb","description":"👨‍🍳 Web apps cook tool. It helps to debug and release your SwifWeb apps.","archived":false,"fork":false,"pushed_at":"2024-10-20T02:19:39.000Z","size":184,"stargazers_count":45,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T13:35:22.601Z","etag":null,"topics":["pwa","spa","swift","web","webapp"],"latest_commit_sha":null,"homepage":"https://swifweb.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swifweb.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":"2021-02-15T14:24:53.000Z","updated_at":"2025-08-27T17:30:39.000Z","dependencies_parsed_at":"2023-12-15T02:06:45.895Z","dependency_job_id":null,"html_url":"https://github.com/swifweb/webber","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/swifweb/webber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swifweb%2Fwebber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swifweb%2Fwebber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swifweb%2Fwebber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swifweb%2Fwebber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swifweb","download_url":"https://codeload.github.com/swifweb/webber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swifweb%2Fwebber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010536,"owners_count":26084759,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["pwa","spa","swift","web","webapp"],"created_at":"2024-07-31T19:01:59.426Z","updated_at":"2025-10-12T07:00:34.174Z","avatar_url":"https://github.com/swifweb.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\" alt=\"MIT License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/swift-5.3-brightgreen.svg\" alt=\"Swift 5.3\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/q5wCPYv\"\u003e\n        \u003cimg src=\"https://img.shields.io/discord/612561840765141005\" alt=\"Swift.Stream\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n# Webber\n\nPowerful console tool for cooking your swifweb apps\n\n## Requirements\n\nmacOS 10.15 and Xcode 11.4 or later.\n\nor \n\nany ubuntu supported on [swift.org](https://swift.org/)\n\n## Installation\n\n#### macOS\n\nOn macOS `webber` can be installed with Homebrew. Make sure you have Homebrew installed and then run:\n\n```bash\nbrew install swifweb/tap/webber\n```\n\nto update already installed version run\n\n```bash\nbrew upgrade webber\n```\n\n#### Ubuntu\n\n1. Install swift manually or via [swiftlang.xyz](https://www.swiftlang.xyz)\n2. Install `binaryen`\n```bash\napt-get install binaryen\n```\n3. Install `wasmer`\n```bash\ncurl https://get.wasmer.io -sSfL | sh\n```\n4. Install `npm`\n```bash\napt-get install npm\n```\n5. Install `webber`\n```bash\ncd /opt\ngit clone https://github.com/swifweb/webber\ncd /opt/webber\nswift build -c release\nln -s /opt/webber/.build/release/Webber /usr/bin/webber\nexec bash\n```\n6. Start using it inside of your project folder\n\nTo update `webber` to latest version just do\n```bash\ncd /opt/webber \u0026\u0026 git pull \u0026\u0026 swift build -c release\n```\n\n## Usage\n\nIf you already have a project then just go to its folder in console\n\nIf you don't then manually `git clone` a template and then go to its directory\n\n### New project\n\nYou can either simply execute `webber new` or clone one of templates manually\n\n```bash\ngit clone https://github.com/swifweb/spa-template myspawebsite\ncd myspawebsite\nopen Package.swift # to work with code\nwebber serve # to launch in browser\n```\n\nprogressive web app\n```bash\ngit clone https://github.com/swifweb/pwa-template mypwawebsite\ncd mypwawebsite\nopen Package.swift # to work with code\nwebber serve -t pwa -s Service # to launch in browser\n```\n\n### Development\n\nif your project is `single page application` then this command will be enough to start working\n\n```bash\nwebber serve \n```\n\nThis command do:\n- compile your project into webassembly file\n- cook needed html and js files, store them into `.webber` hidden folder inside project directory\n- spinup local webserver\n- open default browser to see your web app (it is on http/2 by default with self-signed cert, so add it into system)\n- watch for changes in the project directory, rebuild project automatically and update page in browser\n\nif you clone the `pwa` template then you should additionally provide the following arguments:\n- `-t pwa` to say `webber` that your project should be cooked as PWA\n- the name of your service worker target e.g. `-s Service`\n\nso in the end `serve` command for `pwa` template could look like this\n\n```bash\nwebber serve -t pwa -s Service -p 443 --browser chrome --browser-self-signed --browser-incognito\n```\n\n#### Additional parameters\n\n`-v` or `--verbose` to show more info in console for debugging purposes\n\n`-d` or `--debug-verbose` to show even more details about each step of webber execution\n\n`-p 443` or `--port 443` to start webber server on `443` port instead of default `8888`\n\n`--browser chrome/safari` to automatically open desired browser, by default it doesn't open any\n\n`--browser-self-signed` needed to debug service workers locally, otherwise they doesn't work\n\n`--browser-incognito` to open additional instance of browser in incognito mode, works only with chrome\n\n`--toolchain` to set custom toolchain e.g. `webber serve --toolchain 5.9-SNAPSHOT-2023-08-06-a`\n\n### Release\n\nfor SPA just run\n\n```bash\nwebber release\n```\n\nfor PWA execute it this way\n\n```bash\nwebber release  -t pwa -s Service\n```\n\nand then grub your files from `.webber/release/`\n\n### How to serve release files with `nginx`\n\n1. Install nginx by the [official instrucation](https://www.nginx.com/resources/wiki/start/topics/tutorials/install/)\n2. Edit `/etc/nginx/mime.types` add `application/wasm    wasm;` in order to serve `wasm` files correctly\n3. Generate SSL certificate with letsencrypt (or anything else)\n4. Declare your server like this\n```ruby\nserver {\n    server_name yourdomain.com;\n\n    listen [::]:443 ssl;\n    listen 443 ssl;\n    ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;\n    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;\n    include /etc/letsencrypt/options-ssl-nginx.conf;\n    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;\n    \n    ssl_session_cache    shared:SSL:10m;\n    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;\n    add_header Strict-Transport-Security \"max-age=31536000; includeSubdomains;\";\n    ssl_stapling on;\n    ssl_stapling_verify on;\n    \n    root /app/yourdomain.com/.webber/release;\n    \n    location / {\n        try_files $uri $uri/ /index.html;\n    }\n \t\n    location ~* \\.(js|jpg|png|css|wasm)$ {\n        root /app/yourdomain.com/.webber/release;\n        expires 30d;\n        add_header Cache-Control \"public, no-transform\";\n    }\n}\n```\n\n## Credits\n\nInfinite thanks to the [swiftwasm](https://github.com/swiftwasm) organization for their\n- awesome swift fork adopted for webassembly\n- awesome [JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) which is used under the hood of the `web` package\n- awesome [carton](https://github.com/swiftwasm/carton) tool which was an inspiration for creating `webber` to cover all the needs\n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswifweb%2Fwebber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswifweb%2Fwebber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswifweb%2Fwebber/lists"}