{"id":23819831,"url":"https://github.com/kth/node-web","last_synced_at":"2025-04-13T15:58:18.622Z","repository":{"id":43061306,"uuid":"67412352","full_name":"KTH/node-web","owner":"KTH","description":"Node Web is a frontend service used together with node-api. It is also a template for Node Web applications developed at KTH.","archived":false,"fork":false,"pushed_at":"2025-04-11T02:31:53.000Z","size":20759,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-11T03:33:28.299Z","etag":null,"topics":[],"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/KTH.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-05T10:41:54.000Z","updated_at":"2025-04-11T02:31:56.000Z","dependencies_parsed_at":"2023-11-21T03:26:13.332Z","dependency_job_id":"1fe6bf1e-7e3b-48a1-a6c7-9d5355f31ceb","html_url":"https://github.com/KTH/node-web","commit_stats":null,"previous_names":[],"tags_count":2140,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fnode-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fnode-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fnode-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fnode-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KTH","download_url":"https://codeload.github.com/KTH/node-web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741197,"owners_count":21154252,"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":"2025-01-02T07:16:03.674Z","updated_at":"2025-04-13T15:58:18.596Z","avatar_url":"https://github.com/KTH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Web\n\n## Description\n\nNode Web is a frontend service used together with [node-api](https://github.com/KTH/node-api). It is also a template for Node Web applications developed at KTH.\n\n## Installation\n\n### Install Dependencies\n\n```sh\n$ npm install\n```\n\n### Environment Variables\n\nSensible defaults are set and the application can run locally with a minimal `.env` file. Only `OIDC_APPLICATION_ID` and `OIDC_CLIENT_SECRET` need to be set. They can be retrieved from a key vault in Azure.\n\n| Name                       | Description                                                                                                               | Default Value                                                                                                          |\n| -------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `SERVER_HOST_URL`          | Address to application                                                                                                    | `http://localhost:` + environment variable `SERVER_PORT`                                                               |\n| `SERVER_PORT`              | The HTTP server port                                                                                                      | `3000`                                                                                                                 |\n| `SERVICE_PUBLISH`          | Root path for the application                                                                                             | `/node`                                                                                                                |\n| `NODE_API_KEY`             | API key to connect to `node-api`                                                                                          | `1234`                                                                                                                 |\n| `NODE_API_URI`             | URI to connect to `node-api`, and additional connection parameters                                                        | `http://localhost:3001/api/node?defaultTimeout=10000`                                                                  |\n| `OIDC_CONFIGURATION_URL`   | URL to OpenID Connect server, used by dependency `@kth/kth-node-passport-oidc`                                            | `https://login.ref.ug.kth.se/adfs/.well-known/openid-configuration`                                                    |\n| `OIDC_APPLICATION_ID`      | Application clientID, used by dependency `@kth/kth-node-passport-oidc`                                                    | `null`                                                                                                                 |\n| `OIDC_CLIENT_SECRET`       | Application secret, used by dependency `@kth/kth-node-passport-oidc`                                                      | `null`                                                                                                                 |\n| `OIDC_TOKEN_SECRET`        | Application token secret, used for encrypting token for session storage, used by dependency `@kth/kth-node-passport-oidc` | `tokenSecretString`                                                                                                    |\n| `OIDC_CALLBACK_URL`        | Application’s URL to callback function for standard login, used by dependency `@kth/kth-node-passport-oidc`               | `http://localhost:3000${prefixPath}/auth/login/callback`, where `prefixPath` is environment variable `SERVER_PUBLISH`  |\n| `OIDC_CALLBACK_SILENT_URL` | Application’s URL to callback function for silent login, used by dependency `@kth/kth-node-passport-oidc`                 | `http://localhost:3000${prefixPath}/auth/silent/callback`, where `prefixPath` is environment variable `SERVER_PUBLISH` |\n| `OIDC_CALLBACK_LOGOUT_URL` | Application’s URL to callback function for logout, used by dependency `@kth/kth-node-passport-oidc`                       | `http://localhost:3000${prefixPath}/auth/logout/callback`, where `prefixPath` is environment variable `SERVER_PUBLISH` |\n| `CM_HOST_URL`              | URL to CMS, used by dependency `@kth/cortina-block`                                                                       | `https://www-r.referens.sys.kth.se/cm/`                                                                                |\n| `LOGGING_ACCESS_LOG`       | Enables or disabled application access log, used by dependency `kth-node-access-log`                                      | `true`                                                                                                                 |\n| `LOGGING_LEVEL`            | Application logging level, used by dependency `@kth/log`                                                                  | `debug`                                                                                                                |\n| `SESSION_SECRET`           | Application’s session secret, used by dependency `@kth/session`                                                           | `1234567890`                                                                                                           |\n| `SESSION_KEY`              | Application’ session key, used by dependency `@kth/session`                                                               | `node-web.sid`                                                                                                         |\n| `REDIS_URI`                | URL to [Redis](https://redis.io/), used to store data from CMS and sessions                                               | `redis://localhost:6379/`                                                                                              |\n| `SESSION_USE_REDIS`        | Enables or disables saving sessions to Redis                                                                              | `true`                                                                                                                 |\n| `SESSION_SECURE_COOKIE`    | Enables or disables using secure cookies for sessions, should be `true` unless in local development                       | `false`                                                                                                                |\n| `TOOLBAR_URL`              | URL to KTH’s personal menu, KPM                                                                                           | `https://www-r.referens.sys.kth.se/social/toolbar/widget.js`                                                           |\n\n### Local Databases\n\n- It is recommended to use a local document database (and Redis) with [kth-node-backend](https://github.com/KTH/kth-node-backend)\n\n## Usage\n\nStart the application in local development mode:\n\n```sh\n$ npm run start-dev\n```\n\n## Running Tests\n\nTests are setup with [Jest](https://jestjs.io/). Run them with:\n\n```\n$ npm test\n```\n\n## Contact\n\nNode Web is developed and maintained by [Team KTH Web](https://github.com/orgs/KTH/teams/web-team).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fnode-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkth%2Fnode-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fnode-web/lists"}