{"id":20038040,"url":"https://github.com/perfectlysoft/perfecttemplatefcgi","last_synced_at":"2025-10-14T00:39:39.781Z","repository":{"id":69670198,"uuid":"62095025","full_name":"PerfectlySoft/PerfectTemplateFCGI","owner":"PerfectlySoft","description":"Perfect Empty Starter Project for FastCGI.","archived":false,"fork":false,"pushed_at":"2018-02-09T17:31:19.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-14T00:39:38.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.perfect.org","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerfectlySoft.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-27T23:27:31.000Z","updated_at":"2021-03-07T12:23:54.000Z","dependencies_parsed_at":"2023-03-20T10:18:58.392Z","dependency_job_id":null,"html_url":"https://github.com/PerfectlySoft/PerfectTemplateFCGI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PerfectlySoft/PerfectTemplateFCGI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectlySoft%2FPerfectTemplateFCGI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectlySoft%2FPerfectTemplateFCGI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectlySoft%2FPerfectTemplateFCGI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectlySoft%2FPerfectTemplateFCGI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerfectlySoft","download_url":"https://codeload.github.com/PerfectlySoft/PerfectTemplateFCGI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerfectlySoft%2FPerfectTemplateFCGI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017357,"owners_count":26086052,"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-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2024-11-13T10:24:53.138Z","updated_at":"2025-10-14T00:39:39.753Z","avatar_url":"https://github.com/PerfectlySoft.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PerfectTemplateFCGI [简体中文](README.zh_CN.md)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://perfect.org/get-involved.html\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://perfect.org/assets/github/perfect_github_2_0_0.jpg\" alt=\"Get Involed with Perfect!\" width=\"854\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/PerfectlySoft/Perfect\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg\" alt=\"Star Perfect On Github\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"http://stackoverflow.com/questions/tagged/perfect\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/perfect_gh_button_2_SO.jpg\" alt=\"Stack Overflow\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"https://twitter.com/perfectlysoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg\" alt=\"Follow Perfect on Twitter\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"http://perfect.ly\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg\" alt=\"Join the Perfect Slack\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://developer.apple.com/swift/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat\" alt=\"Swift 3.0\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://developer.apple.com/swift/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat\" alt=\"Platforms OS X | Linux\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://perfect.org/licensing.html\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat\" alt=\"License Apache\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://twitter.com/PerfectlySoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Twitter-@PerfectlySoft-blue.svg?style=flat\" alt=\"PerfectlySoft Twitter\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://perfect.ly\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://perfect.ly/badge.svg\" alt=\"Slack Status\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nPerfect Empty Starter FastCGI Project\n\nThis repository holds a blank Perfect project which can be cloned to serve as a starter for new work. It builds with Swift Package Manager and produces a FastCGI based server executable.\n\nThis server can run with any FastCGI enabled webserver over either UNIX socket files or TCP.\n\n## Apache 24\nTo run with Apache 2.4, build and install the mod_perfect FastCGI module:\n\n[Perfect-FastCGI-Apache2.4](https://github.com/PerfectlySoft/Perfect-FastCGI-Apache2.4)\n\n## NGINX\nInstructions for running with NGINX:\n\n[NGINX](https://github.com/PerfectlySoft/Perfect/wiki/NGINX)\n\n## Building \u0026 Running\n\nThe following will clone and build an empty starter project and launch the server.\n\n```\ngit clone https://github.com/PerfectlySoft/PerfectTemplateFCGI.git\ncd PerfectTemplateFCGI\nswift build\n.build/debug/PerfectTemplateFCGI\n```\n\nYou should see the following output:\n\n```\nStarting FastCGI server on named pipe /Library/WebServer/VirtualHosts/perfect.fastcgi.sock\n```\n\nThis means the server is running and waiting for connections.\n\n## Starter Content\n\nThe template file contains a very simple \"hello, world!\" example. Note that you must install mod_perfect or otherwise configure your web server for FastCGI and change the namedPipe path such that it points one level above your server's document root.\n\n```swift\nimport PerfectFastCGI\nimport PerfectHTTP\n\nvar routes = Routes()\nroutes.add(method: .get, uri: \"/**\") {\n    req, resp in\n    resp.appendBody(string: \"\u003chtml\u003e\u003ctitle\u003eHello, world!\u003c/title\u003e\u003cbody\u003eHello, world!\u003c/body\u003e\u003c/html\u003e\")\n    resp.completed()\n}\n\nlet server = FastCGIServer()\nserver.addRoutes(routes)\n\ndo {\n    // Launch the FastCGI server\n    // The path to the sock file must point to a directory one level up from the site's document root.\n    // The file must be called \"perfect.fastcgi.sock\"\n    // For example, the following path would suffice for a server whose document root is:\n    // /Library/WebServer/VirtualHosts/wwwroot/\n    try server.start(namedPipe: \"/Library/WebServer/VirtualHosts/perfect.fastcgi.sock\")\n} catch {\n    print(\"Error thrown: \\(error)\")\n}\n```\n\n## Further Information\nFor more information on the Perfect project, please visit [perfect.org](http://perfect.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectlysoft%2Fperfecttemplatefcgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperfectlysoft%2Fperfecttemplatefcgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectlysoft%2Fperfecttemplatefcgi/lists"}