{"id":13452389,"url":"https://github.com/IntrinsicLabs/osgood","last_synced_at":"2025-03-23T19:34:15.222Z","repository":{"id":34949299,"uuid":"193176769","full_name":"IntrinsicLabs/osgood","owner":"IntrinsicLabs","description":"Osgood is a secure, fast, and simple platform for running JavaScript HTTP servers.","archived":false,"fork":false,"pushed_at":"2023-01-07T06:36:48.000Z","size":672,"stargazers_count":642,"open_issues_count":23,"forks_count":21,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-11T13:11:11.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/IntrinsicLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-22T01:10:45.000Z","updated_at":"2024-11-05T00:29:41.000Z","dependencies_parsed_at":"2023-01-15T10:55:04.948Z","dependency_job_id":null,"html_url":"https://github.com/IntrinsicLabs/osgood","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntrinsicLabs%2Fosgood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntrinsicLabs%2Fosgood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntrinsicLabs%2Fosgood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntrinsicLabs%2Fosgood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntrinsicLabs","download_url":"https://codeload.github.com/IntrinsicLabs/osgood/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245159360,"owners_count":20570371,"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":[],"created_at":"2024-07-31T07:01:22.734Z","updated_at":"2025-03-23T19:34:14.706Z","avatar_url":"https://github.com/IntrinsicLabs.png","language":"Rust","funding_links":[],"categories":["Rust","others"],"sub_categories":[],"readme":"![Osgood](./osgood.svg)\n\n[![Gitter](https://badges.gitter.im/osgoodplace/community.svg)](https://gitter.im/osgoodplace/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nOsgood is a secure, fast, and simple platform for running JavaScript HTTP\nservers. It is written using Rust and V8.\n\nServices written today share a common flaw: Being over-privileged. Osgood is an\nattempt to build a platform from the ground up, one which applies the\n[_Principle of Least\nPrivilege_](https://en.wikipedia.org/wiki/Principle_of_least_privilege) at its\nvery core. Osgood requires that policies be written ahead of time describing\nthe I/O requirements of an application. If such an operation hasn't been\nwhitelisted, it will fail. Developers familiar with JavaScript development in\nthe web browser should feel right at home with the APIs provided in Osgood.\n\n\n## Documentation\n\n- [Osgood API Docs](https://github.com/IntrinsicLabs/osgood/wiki)\n- [Introducing Osgood (blog)](https://dev.to/tlhunter/introducing-osgood-4k1m)\n- [Hosting a Static Site and Contact Form with Osgood (blog)](https://dev.to/tlhunter/hosting-a-static-site-and-contact-form-with-osgood-5c1g)\n- [Osgood and CouchDB (blog)](https://dev.to/tlhunter/osgood-and-couchdb-125k)\n- [Introducing Osgood (presentation)](https://thomashunter.name/presentations/introducing-osgood/#/)\n\n\n## Hello, World!\n\n```javascript\n// app.js\napp.port = 3000;\n\napp.get('/hello', 'hello-worker.js');\n```\n\n```javascript\n// hello-worker.js\nexport default () =\u003e 'Hello, World!';\n```\n\n```bash\n$ osgood app.js\n$ curl http://localhost:3000/hello\n```\n\n\n## What is Osgood?\n\nOsgood is a JavaScript runtime purpose-built to run HTTP servers. Its goals are\nto provide a secure way to build HTTP servers that are fast and simple. Osgood\nhandles server routing and configuration for you, allowing you to focus on\napplication code.\n\nToday we build web applications with general purpose language runtimes. Osgood\nis an experiment that asks the question: \"What if we built a runtime\nspecifically for web apps? What kind of benefits can we get from being at\na higher level of abstraction?\"\n\nSince the Osgood runtime has intimate knowledge of the routing table we get the\nability to isolate controllers for free (we refer to these as Workers). The I/O\nperformed by the application, as well as policy enforcement, happens in\nRust-land. Each worker has its own set of permissions.\n\nHere's an example policy:\n\n```javascript\npolicy.outboundHttp.allowGet('https://intrinsic.com');\n```\n\nConsider the situation where Controller A has permission to send a message to\n`intrinsic.com`, and Controller B has access to user credentials. Within\na properly configured Osgood application this means it's not possible to\ntransmit user credentials to `intrinsic.com`.\n\n\n## Installing Osgood\n\n### Download a Prebuilt Release\n\nAll prebuilt releases can be downloaded from the\n[Releases](https://github.com/IntrinsicLabs/osgood/releases) page.\n\n### Building Osgood\n\nWe have more information on compiling Osgood on our [Building\nOsgood](https://github.com/IntrinsicLabs/osgood/wiki/Building) wiki page.\n\n\n## Osgood Overview\n\n### Application File\n\nAn Osgood application file is essentially the entrypoint for the application.\nEach application will have a single application file. It is the only necessary\nargument for the `osgood` command.\n\nThis file has three purposes:\n\n- Configure global settings such as port and interface\n- Route incoming requests to the desired Osgood worker\n- Configure the security policies for each Osgood worker\n\nMore information about Osgood application files are available on the [Osgood\nApplication\nFile](https://github.com/IntrinsicLabs/osgood/wiki/Osgood-Application-File)\nwiki page.\n\n\n### Worker File\n\nAn Osgood worker file works by exporting a default function. Typically you'll\nexport an `async` function but it also works fine by returning a promise or a\nstring value.\n\nWorkers are called with information about the incoming request and the returned\nvalue is then used to dictate the response to the client.\n\nMore information about Osgood worker files are available on the [Osgood Worker\nFiles](https://github.com/IntrinsicLabs/osgood/wiki/Osgood-Worker-Files) wiki\npage.\n\n## Contributing\n\nContributions are welcome! Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md).\n\n## License\n\nOsgood uses the MIT License. Please see [`LICENSE.txt`](./LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIntrinsicLabs%2Fosgood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIntrinsicLabs%2Fosgood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIntrinsicLabs%2Fosgood/lists"}