{"id":18648026,"url":"https://github.com/cezarsmpio/fogo","last_synced_at":"2026-05-14T20:32:50.325Z","repository":{"id":57239632,"uuid":"189090375","full_name":"cezarsmpio/fogo","owner":"cezarsmpio","description":"🔥 Yet another node.js framework, but simpler.","archived":false,"fork":false,"pushed_at":"2019-07-04T14:18:17.000Z","size":183,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-09T20:12:40.281Z","etag":null,"topics":["framework","http","http-server","http-server-handler","http-server-request","javascript","nodejs","nodejs-library","nodejs-server","request","response"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cezarsmpio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-28T19:27:49.000Z","updated_at":"2019-07-04T14:18:18.000Z","dependencies_parsed_at":"2022-08-30T00:11:25.212Z","dependency_job_id":null,"html_url":"https://github.com/cezarsmpio/fogo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cezarsmpio/fogo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cezarsmpio%2Ffogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cezarsmpio%2Ffogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cezarsmpio%2Ffogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cezarsmpio%2Ffogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cezarsmpio","download_url":"https://codeload.github.com/cezarsmpio/fogo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cezarsmpio%2Ffogo/sbom","scorecard":{"id":271763,"data":{"date":"2025-08-11","repo":{"name":"github.com/cezarsmpio/fogo","commit":"33bd423795b9c2fb303cc866b7644b780f2be841"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"57 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T13:35:05.316Z","repository_id":57239632,"created_at":"2025-08-17T13:35:05.316Z","updated_at":"2025-08-17T13:35:05.316Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33042168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["framework","http","http-server","http-server-handler","http-server-request","javascript","nodejs","nodejs-library","nodejs-server","request","response"],"created_at":"2024-11-07T06:28:33.444Z","updated_at":"2026-05-14T20:32:50.309Z","avatar_url":"https://github.com/cezarsmpio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fogo 🔥\n\n\u003e Yet another node.js framework, but simpler.\n\n[![Build Status](https://travis-ci.com/cezarsmpio/fogo.svg?branch=master)](https://travis-ci.com/cezarsmpio/fogo)\n[![npm download](https://img.shields.io/npm/dm/fogo.svg)](https://www.npmjs.com/package/fogo)\n[![GitHub issues](https://img.shields.io/github/issues/cezarsmpio/fogo.svg)](https://github.com/cezarsmpio/fogo/issues)\n[![minified + gzip](https://badgen.net/bundlephobia/minzip/fogo)](https://bundlephobia.com/result?p=fogo)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![npm version](https://img.shields.io/npm/v/fogo.svg)](https://www.npmjs.com/package/fogo)\n[![GitHub contributors](https://img.shields.io/github/contributors/cezarsmpio/fogo.svg)](https://GitHub.com/cezarsmpio/fogo/graphs/contributors/)\n[![GitHub stars](https://img.shields.io/github/stars/cezarsmpio/fogo.svg?style=social\u0026label=Star)](https://github.com/cezarsmpio/fogo)\n\n### Install\n\n```\nnpm install fogo --save\n```\n\n`fogo` supports only node 8+ because of `async`/`await`.\n\n### Why? Why? Why?\n\n`fogo`, means `fire` in Portuguese 🤷‍♀️. It is basically a wrapper for the [node.js http module](https://nodejs.org/api/http.html#http_class_http_server).\n\nSometimes `Express`, which is a good framework, is too much for your needs or too heavy because of its tons of dependencies, especially if you do microservices or have a lot of CI/CD going on.\n\nOnly use `fogo` if you want to use the `http` module provided by node.js but without dealing with routes.\n\n`fogo` does not support middlewares. You _really_ don't need it.\n\nWhat `fogo` is good for:\n\n-   microservices\n-   restful/json apis\n\nWhat `fogo` is not good for:\n\n-   applications using template engines\n-   monolithic applications\n\nAn alternative to `fogo` is [`micro`](https://github.com/zeit/micro).\n\n### Usage\n\n```js\nconst fogo = require('fogo');\n\nconst handlers = {\n    '/': (req, res, url) =\u003e {\n        res.writeHead(200); // Pure node.js!\n\n        res.end('Hello world!'); // you see?!?\n    },\n    '/products/:id': {\n        get: async (req, res, url, params) =\u003e {\n            try {\n                await validateRequest(req, schema); // Why middlewares? :)\n                const product = await getProductFromDB(params.id);\n\n                res.writeHead(200);\n                res.end(JSON.stringify(product));\n            } catch (err) {\n                res.writeHead(404);\n                res.end('Oops, this product does not exist.');\n            }\n        }\n    },\n    '/customers': {\n        post: async (req, res) =\u003e {\n            try {\n                await validateRequest(req, schema); // Why middlewares? :)\n                const body = await json(req);\n                const customer = await createCustomer(body.customer);\n\n                res.setHeader('x-foo', 'bar');\n                res.writeHead(201);\n                res.end('Customer created');\n            } catch (err) {\n                res.writeHead(403);\n                res.end(\n                    JSON.stringify({\n                        statusCode: 403,\n                        message: 'Something crazy just happened!'\n                    })\n                );\n            }\n        }\n    }\n};\n\nconst notFoundHandler = (req, res) =\u003e {\n    res.writeHead(404);\n    res.end('Not found, sorry!');\n};\n\nconst server = fogo.createServer(handlers, notFoundHandler);\n\n// server is just a wrapper for the http.Server class\nserver.on('clientError', (err, socket) =\u003e {\n    socket.end('HTTP/1.1 400 Bad Request\\r\\n\\r\\n');\n});\n\nserver.listen(3000, () =\u003e {\n    console.log('Running at localhost:3000!');\n});\n```\n\n## API\n\n### `createServer`\n\n```js\nconst server = fogo.createServer(handlers, notFoundListener, errorHandler);\n```\n\nSince `fogo.createServer` returns a [`http.Server`](https://nodejs.org/api/http.html#http_class_http_server) class, you should be able to use all its methods. Please, check out the documentation for more information.\n\nIt creates a server that you can listen to. It accepts two arguments:\n\n#### `handlers`: object - required\n\nAn object containing your handlers for each route with/without specifying the http method. Specify a function if you want that route to listen to all http methods.\n\n```js\nconst handlers = {\n    '/': (req, res, url, params) =\u003e {\n        res.end();\n    },\n    '/welcome': {\n        get: (req, res, url, params) =\u003e {\n            res.end();\n        },\n        post: (req, res, url, params) =\u003e {\n            res.end();\n        }\n    }\n};\n```\n\nArguments received:\n\n-   `req`: [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage)\n-   `res`: [http.ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse)\n-   `url?`: [url.UrlWithParsedQuery](https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)\n-   `params?`: object\n\n#### `notFoundListener`: function\n\nIf none of you handle has the requested route, this callback is called.\n\n`fogo` provides a default one.\n\n```js\nfunction defaultNotFound(req, res) {\n    res.writeHead(404);\n    res.end(http.STATUS_CODES[404]);\n}\n```\n\nThe response will look like:\n\n```\nNot Found\n```\n\nArguments received:\n\n-   `req`: [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage)\n-   `res`: [http.ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse)\n-   `url?`: [url.UrlWithParsedQuery](https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)\n-   `error?`: Error\n\n#### `errorHandler`: function\n\nIt's called when an exception is thrown on the request.\n\n`fogo` provides a default one.\n\n```js\nfunction defaultErrorHandler(req, res, parsedUrl, err) {\n    console.log(err);\n\n    res.writeHead(500);\n    res.end(http.STATUS_CODES[500]);\n}\n```\n\nThe response will look like:\n\n```\nInternal Server Error\n```\n\nArguments received:\n\n-   `req`: [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage)\n-   `res`: [http.ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse)\n-   `url?`: [url.UrlWithParsedQuery](https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)\n-   `error?`: Error\n\n---\n\nMade with ❤️ enjoy it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcezarsmpio%2Ffogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcezarsmpio%2Ffogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcezarsmpio%2Ffogo/lists"}