{"id":19425506,"url":"https://github.com/instafluff/webwebwebs","last_synced_at":"2025-04-24T16:31:37.838Z","repository":{"id":42276077,"uuid":"258956634","full_name":"instafluff/WebWebWebs","owner":"instafluff","description":"The lightest alternative to ExpressJS. Create servers with APIs SUPER EASILY in just a few lines of code with automated SSL Certificates!","archived":false,"fork":false,"pushed_at":"2023-11-05T20:00:58.000Z","size":232,"stargazers_count":10,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T08:24:49.624Z","etag":null,"topics":["api","api-server","automatic","easy","express","expressjs","html","http","https","https-server","javascript","letsencrypt","renew","server","simple","ssl","ssl-certificates","static-server","static-website","webserver"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/instafluff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-26T06:26:33.000Z","updated_at":"2023-06-19T03:05:48.000Z","dependencies_parsed_at":"2022-08-25T10:50:26.379Z","dependency_job_id":"d2b6b20d-90b9-4461-8004-d5925edae236","html_url":"https://github.com/instafluff/WebWebWebs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FWebWebWebs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FWebWebWebs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FWebWebWebs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FWebWebWebs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instafluff","download_url":"https://codeload.github.com/instafluff/WebWebWebs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250663544,"owners_count":21467366,"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":["api","api-server","automatic","easy","express","expressjs","html","http","https","https-server","javascript","letsencrypt","renew","server","simple","ssl","ssl-certificates","static-server","static-website","webserver"],"created_at":"2024-11-10T14:03:43.389Z","updated_at":"2025-04-24T16:31:37.537Z","avatar_url":"https://github.com/instafluff.png","language":"TypeScript","readme":"# WebWebWebs\nThe lightest alternative to ExpressJS with HTTPS. The Comfiest Way to make web APIs and static file servers with automated SSL Certificates!\n\n**WebWebWebs** lets you create a web server with APIs ***SUPER EASILY*** in just a few lines of code while also automatically getting free SSL certificates via [Let's Encrypt](https://www.letsencrypt.org) and renewing them.\n\nJust set your **domain** and **e-mail** address, and a SSL certificate will be retrieved and automatically renewed 30 days before expiration with **ZERO DOWNTIME** without a restart of your server or connections.\n\n*If you just need a web server without SSL certificates, check out the regular, zero-dependency [WebWebWeb](https://www.github.com/instafluff/WebWebWeb)!*\n\n## Instafluff ##\n\u003e *Like these projects? The best way to support my open-source projects is by becoming a Comfy Sponsor on GitHub!*\n\n\u003e https://github.com/sponsors/instafluff\n\n\u003e *Come and hang out with us at the Comfiest Corner on Twitch!*\n\n\u003e https://twitch.tv/instafluff\n\n## Requirements \u0026 Notes ##\n\n### PORT 80 ###\nPort 80 must be open and available so that ACME challenges can be successfully completed.\n\n### Domain Name ###\nThe specified domain must point to the server running with **WebWebWebs**. Ensure you have created an A Record on your DNS to your server.\n\n### No Response Error from Xfinity/Comcast ###\nIf you are running your server from Xfinity as your ISP and the ACME challenges are failing, you may need to turn off Advanced Security network settings on your account. Read [here](https://www.xfinity.com/support/articles/using-xfinity-xfi-advanced-security) for instructions on how to turn this setting off.\n\n## Instructions ##\n\n1. Install `webwebwebs`\n```\nnpm install webwebwebs --save\n```\n\n2. Start the server on a port (e.g. 443 for HTTPS). Any HTML pages (e.g. index.html) can be placed in the root directory `/` and static files (e.g. images, scripts, and other HTML pages) can go into `/web` or `/public` and it will be served automagically\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.Run( 443, {\n    domain: \"webwebwebs.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n\n3. (Optional) Add APIs\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.APIs[ \"/\" ] = ( qs, body, opts ) =\u003e {\n  return { \"test\": \"example!\" };\n};\nComfyWeb.Run( 443, {\n    domain: \"webwebweb.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n\n### Options ###\n\nThe `Run()` function in **WebWebWebs** accepts several optional parameters:\n- useCORS (default: true)\n- test (default: false)\n\n## Testing Certificates (Staging) ##\nTo use the **Staging** environment to test certificates with [Let's Encrypt](https://www.letsencrypt.org), enable the `test` parameter.\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.Run( 443, {\n    test: true,\n    domain: \"webwebweb.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n\n## Handling POST/PUT/DELETE requests ##\nAll request methods are sent to the API handler. You can check the `opts.req.method` value to response accordingly and parse the body object for data.\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.APIs[ \"/account\" ] = ( qs, body, opts ) =\u003e {\n    switch( opts.req.method ) {\n        case \"GET\":\n            return { \"account\": \"test\" };\n        case \"POST\":\n            return JSON.parse( body );\n        case \"PUT\":\n            return { \"status\": \"updated\" };\n        case \"DELETE\":\n            return {};\n    }\n};\nComfyWeb.Run( 443, {\n    domain: \"webwebweb.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n\n## Reading Request Headers ##\nThe request object is passed in to the API handler. You can check for header values in `opts.req.headers`.\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.APIs[ \"/\" ] = ( qs, body, opts ) =\u003e {\n    return opts.req.headers;\n};\nComfyWeb.Run( 443, {\n    domain: \"webwebweb.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n\n## Enabling CORS ##\nActually, CORS is enabled by default. To disable CORS, set the `useCORS` parameter:\n```javascript\nvar ComfyWeb = require( \"webwebwebs\" );\nComfyWeb.Run( 443, {\n    useCORS: false,\n    domain: \"webwebweb.instafluff.tv\",\n    email: \"waa@instafluff.tv\"\n} );\n```\n","funding_links":["https://github.com/sponsors/instafluff"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstafluff%2Fwebwebwebs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstafluff%2Fwebwebwebs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstafluff%2Fwebwebwebs/lists"}