{"id":23944057,"url":"https://github.com/niclashaderer/luftschloss","last_synced_at":"2026-02-15T19:32:56.296Z","repository":{"id":47791081,"uuid":"516313775","full_name":"NiclasHaderer/luftschloss","owner":"NiclasHaderer","description":"Dependencyless pure typescript webserver with openapi generation","archived":false,"fork":false,"pushed_at":"2025-02-09T17:43:58.000Z","size":2699,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T12:46:39.903Z","etag":null,"topics":["http","node","server","typescript"],"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/NiclasHaderer.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":"2022-07-21T09:51:02.000Z","updated_at":"2025-02-09T17:42:54.000Z","dependencies_parsed_at":"2024-01-04T14:33:36.428Z","dependency_job_id":"95e4e660-536c-4236-9661-9038c9fbecb3","html_url":"https://github.com/NiclasHaderer/luftschloss","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/NiclasHaderer/luftschloss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiclasHaderer%2Fluftschloss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiclasHaderer%2Fluftschloss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiclasHaderer%2Fluftschloss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiclasHaderer%2Fluftschloss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiclasHaderer","download_url":"https://codeload.github.com/NiclasHaderer/luftschloss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiclasHaderer%2Fluftschloss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["http","node","server","typescript"],"created_at":"2025-01-06T06:17:28.559Z","updated_at":"2026-02-15T19:32:56.280Z","avatar_url":"https://github.com/NiclasHaderer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Luftschloss\n\nLuftschloss is a simple, lightweight and dependency-free webserver in Node.js.\n\n## Getting started\n\n```\n# (If you don't have yarn installed install it with `npm install -g yarn`)\n# Install dependencies used for building the project\nyarn install\n\n\n# Build all projects and apps\nnpx nx run-many -t build --all\n```\n\n## Structure of the repository\n\nAll packages are located in the `packages` folder. The `apps` folder contains all applications that are built on top of\nthe packages and can be viewed as a showcase of the packages.\n\n### Packages\n\n1. `@luftschloss/client`: A http client for Node.js\n2. `@luftschloss/common`: The core package containing common functionality used by most other packages.\n3. `@luftschloss/mocking`: Automatically mock your api calls.\n4. `@luftschloss/openapi`: An openapi extension for the `@luftschloss/server` package. Just write your code and the\n   openapi spec will be generated automatically.\n5. `@luftschloss/openapi-schema`: The schema generation logic for the `@luftschloss/openapi` package.\n6. `@luftschloss/proxy`: A proxy server for the `@luftschloss/server` package built on top of the `@luftschloss/client`\n   package.\n7. `@luftschloss/server`: The luftschloss http server\n8. `@luftschloss/static`: Static file extensions for the `@luftschloss/server` package.\n9. `@luftschloss/testing`: Testing utilities for the `@luftschloss/server` package. Use this to test your server without\n   ever having to start it.\n10. `@luftschloss/validation`: A custom validation library which can be used on the client and server side. It is used\n    by the `@luftschloss/openapi` package.\n\n## Demonstration applications\n\n\u003e :warning:\n\u003e\n\u003e 1. make sure that you have set _Thunder-client: Save To Workspace_ to `true` in your vscode settings\n\u003e 2. make sure that you disable _Thunder-client: Follow Redirect_ in the thunderclient settings\n\u003e 3. make sure you delete the `shortener.db` file and the `users.db` file before starting the application to make sure\n\n     that the database is empty\n\n## url-shortener\n\nThe application in `apps/url-shortener` is a simple url shortener application. It uses the `@luftschloss/openapi`\npackage in combination with the `@luftschloss/server` to automatically generate an openapi spec.\nThe `@luftschloss/client` package is used to verify that the urls which should be shortened actually exist and return a\n_successful_ status code.\n\nBe aware of the fact that without a JWT you will not be able to shorten urls. Obtain an JWT by making a request to the\nauthentication service. The authentication service has to be running for the url-shortener to work.\n\n```bash\n# Start the application\nnpx nx serve url-shortener\n\n# Open the openapi spec (choose one of the following)\nopen http://127.0.0.1:3200/docs/swagger\nopen http://127.0.0.1:3200/docs/stoplight\nopen http://127.0.0.1:3200/docs/redoc\n```\n\n# authentication\n\nThe application in `apps/authentication` is a simple authentication application. It uses the `@luftschloss/openapi` and\n`@luftschloss/server` packages to automatically generate an openapi spec.\n\n```\n# Start the application\nnpx nx serve authentication\n\n# Open the openapi spec (choose one of the following)\nopen http://127.0.0.1:3300/docs/swagger\nopen http://127.0.0.1:3300/docs/stoplight\nopen http://127.0.0.1:3300/docs/redoc\n\n# Open vs-code and open the thunderclient extension\n# 1. Run the *authentication* collection before the *url-redirect* collection\ncode apps/authentication\n```\n\n## Build the docker images\n\n```bash\n# Build the docker images\nnx container url-shortener\nnx container authentication\n```\n\n```bash\n# Tag the docker images\ndocker tag luftschloss/url-shortener:main andfaxle/url-shortener:latest\ndocker tag luftschloss/authentication:main andfaxle/authentication:latest\n```\n\n```bash\n\n# Push the docker images to docker hub to repo andfaxle/wscbs\ndocker push andfaxle/url-shortener:latest\ndocker push andfaxle/authentication:latest\n```\n\n```bash\n# Start the docker images\ndocker run -p 3200:3200 luftschloss/url-shortener:main\ndocker run -p 3300:3300 luftschloss/authentication:main\n\n# Add a new docker build target to an application\nnx g @nx-tools/nx-container:init \u003capp-name\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniclashaderer%2Fluftschloss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniclashaderer%2Fluftschloss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniclashaderer%2Fluftschloss/lists"}