{"id":15673481,"url":"https://github.com/jwebcoder/secret-server","last_synced_at":"2026-02-26T10:08:25.085Z","repository":{"id":40730658,"uuid":"227250048","full_name":"JWebCoder/secret-server","owner":"JWebCoder","description":"secret-server hides your application behind a password","archived":false,"fork":false,"pushed_at":"2023-01-24T00:55:47.000Z","size":1507,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T07:45:39.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/JWebCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"jwebcoder","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-12-11T01:34:17.000Z","updated_at":"2021-05-17T21:19:34.000Z","dependencies_parsed_at":"2023-02-13T07:00:48.888Z","dependency_job_id":null,"html_url":"https://github.com/JWebCoder/secret-server","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/JWebCoder%2Fsecret-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2Fsecret-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2Fsecret-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2Fsecret-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JWebCoder","download_url":"https://codeload.github.com/JWebCoder/secret-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247584060,"owners_count":20962071,"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-10-03T15:40:55.469Z","updated_at":"2025-10-29T04:40:21.710Z","avatar_url":"https://github.com/JWebCoder.png","language":"TypeScript","funding_links":["https://patreon.com/jwebcoder"],"categories":[],"sub_categories":[],"readme":"# secret-server\n\n[![Donate on patreon](https://img.shields.io/badge/donate-patreon-F96854.svg)](https://patreon.com/jwebcoder)\n[![Build Status][actions-badge]][actions]\n[![codecov][codecov-badge]][codecov]\n![node][node]\n[![npm version][npm-badge]][npm]\n[![dependencies Status][dependencies-badge]][dependencies]\n[![devDependencies Status][dev-dependencies-badge]][dev-dependencies]\n[![PRs Welcome][prs-badge]][prs]\n[![GitHub][license-badge]][license]\n\nSecret-server hides your application behind a password\n\nThis module will make the application unaccessible until the user enters the correct password\n\n## Why?\n\nThis module was done with the intent to be used during development stages of an application, in order to be able to demo it to the client but keeping hidden from outsiders.\n\n## Installation\n\n`npm i secret-server`\n\n## Usage\n\n```javascript\n\nimport secretServer from 'secret-server'\n\nexpressApp.use(cookieSession({\n  name: 'session',\n  keys: ['key1', 'key2'],\n})) // or any other session (express-session for example)\nexpressApp.use(secretServer(/* configuration object */{\n  password: 'test',\n  redirect: '/',\n  successRedirect: '/success',\n})) // this should be done before setting the routes\n```\n\nPlease check the tests folder for a more complete working example\n\n## Configuration object\n\nAll properties are not required\n\n| Property | description | default |\n| -------- | ----------  | ------- |\n| password        | password to be used                                                     | test\n| successRedirect | path to redirect the user after a successful authorization | undefined\n| redirect        | path to redirect the user when not authorized                           | undefined\n| file            | path to the html file with the user input for authorization | undefined\n\n## License\n\nMIT\n\n[actions-badge]: https://github.com/jwebcoder/secret-server/workflows/Build/badge.svg\n[actions]: https://github.com/JWebCoder/secret-server/actions\n\n[codecov-badge]: https://codecov.io/gh/JWebCoder/secret-server/branch/master/graph/badge.svg\n[codecov]: https://codecov.io/gh/JWebCoder/secret-server\n\n[node]: https://img.shields.io/node/v/secret-server.svg\n\n[npm-badge]: https://badge.fury.io/js/secret-server.svg\n[npm]: https://badge.fury.io/js/secret-server\n\n[dependencies-badge]: https://david-dm.org/JWebCoder/secret-server/status.svg\n[dependencies]: https://david-dm.org/JWebCoder/secret-server\n\n[dev-dependencies-badge]: https://david-dm.org/JWebCoder/secret-server/dev-status.svg\n[dev-dependencies]: https://david-dm.org/JWebCoder/secret-server?type=dev\n\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[prs]: http://makeapullrequest.com\n\n[license-badge]: https://img.shields.io/github/license/JWebCoder/secret-server.svg\n[license]: https://github.com/JWebCoder/secret-server/blob/master/LICENSE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwebcoder%2Fsecret-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwebcoder%2Fsecret-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwebcoder%2Fsecret-server/lists"}