{"id":13553998,"url":"https://github.com/heiseonline/embetty-server","last_synced_at":"2025-04-03T06:30:58.657Z","repository":{"id":28304122,"uuid":"111410181","full_name":"heiseonline/embetty-server","owner":"heiseonline","description":"🐙 Proxy and provider of data for heiseonline/embetty","archived":true,"fork":false,"pushed_at":"2024-02-09T14:02:16.000Z","size":1814,"stargazers_count":160,"open_issues_count":28,"forks_count":16,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2025-03-14T10:39:32.471Z","etag":null,"topics":["backend","embetty","javascript","privacy"],"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/heiseonline.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2017-11-20T12:53:00.000Z","updated_at":"2025-02-01T06:00:07.000Z","dependencies_parsed_at":"2024-01-14T15:21:44.292Z","dependency_job_id":"7156ae9a-abeb-40ce-8187-fb8de1cceb57","html_url":"https://github.com/heiseonline/embetty-server","commit_stats":{"total_commits":156,"total_committers":10,"mean_commits":15.6,"dds":0.5769230769230769,"last_synced_commit":"aa82dfb731ee80fc4c37d0a0dc8c8c4260cdd5df"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiseonline%2Fembetty-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiseonline%2Fembetty-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiseonline%2Fembetty-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiseonline%2Fembetty-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heiseonline","download_url":"https://codeload.github.com/heiseonline/embetty-server/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246947844,"owners_count":20859326,"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":["backend","embetty","javascript","privacy"],"created_at":"2024-08-01T12:02:37.734Z","updated_at":"2025-04-03T06:30:58.154Z","avatar_url":"https://github.com/heiseonline.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","backend"],"sub_categories":[],"readme":"# embetty-server  · [![Build Status](https://travis-ci.org/heiseonline/embetty-server.svg?branch=master)](https://travis-ci.org/heiseonline/embetty-server)  [![Dependency Status](https://img.shields.io/david/heiseonline/embetty-server.svg?style=flat-square)](https://david-dm.org/heiseonline/embetty-server) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n# This repository is outdated. Embetty-Server and other embetty projects are now part of the Monorepo [Embetty](https://github.com/heiseonline/embetty)\n\n[Embetty](https://github.com/heiseonline/embetty) displays remote content like tweets or YouTube videos without compromising your privacy. `embetty-server` acts as a proxy and provides the necessary data.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Embetty\" src=\"assets/embetty.png\" width=\"360\"\u003e\n\u003c/p\u003e\n\nEmbetty server can be run in two different ways:\n\n- Use the [official Docker image](https://hub.docker.com/r/heiseonline/embetty-server/) to run it in a container.\n- [Install it directly and use a process manager](#running-embetty-server-with-a-process-manager).\n\nIt's necessary to configure a reverse proxy to make Embetty server reachable either way.\n\n## Running Embetty server with Docker\n\nThe docker image exposes the server on port `8080` and can be [configured](#configuration) using environment variables.\n\n```sh\n$ docker run \\\n  -p 8080:8080 \\\n  --name embetty \\\n  --rm \\\n  -e VALID_ORIGINS=https://example.com \\\n  -e TWITTER_ACCESS_TOKEN_KEY=... \\\n  -e TWITTER_ACCESS_TOKEN_SECRET=... \\\n  -e TWITTER_CONSUMER_KEY=... \\\n  -e TWITTER_CONSUMER_SECRET=... \\\n  heiseonline/embetty-server:latest\n```\n\n## Running Embetty server with a process manager\n\nThis requires Node.js version 8 or later.\n\n1. Install Embetty server by running `yarn global add @heise/embetty-server`. This makes the `embetty` command available on the server.\n2. Setup a process manager like [Forever](https://github.com/foreverjs/forever), [PM2](https://github.com/Unitech/pm2) or [StrongLoop Process Manager](http://strong-pm.io/).\n3. Configure the Process manager to run `embetty start`. The command `embetty start --help` prints a list of all supported options.\n\n## Configuration\n\nEmbetty server can be configured using the following environment variables:\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `URL_BASE` | no | The base URL of the Embetty server instance, e.g. `https://my-server.com/path/to/embetty`. |\n| `DEBUG` | no | This variable controls the output of log messages. You may set it to `embetty.*` to log all Embetty messages to `STDOUT`. |\n| `EMBETTY_CACHE`| no | Connection string of a cache adapter. Currently [Redis](https://www.iana.org/assignments/uri-schemes/prov/redis) (example: `redis://`) and LRU (example: `lru://`) are supported. |\n| `PORT` | no | This variable can be used to specify the port on which Embetty Server listens. Default: `3000` |\n| `TWITTER_ACCESS_TOKEN_KEY` | [[1](#twitter)] | Twitter Access Token |\n| `TWITTER_ACCESS_TOKEN_SECRET` | [[1](#twitter)] | Twitter Access Token Secret |\n| `TWITTER_CONSUMER_KEY` | [[1](#twitter)] | Twitter consumer Key (API Key) |\n| `TWITTER_CONSUMER_SECRET` | [[1](#twitter)] | Twitter consumer Secret (API Secret) |\n| `VALID_ORIGINS` | yes | Contains a comma-separated list of allowed [origins](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin). Examples: `https://example.com`, `https://a.example.com,https://b.example.com` or `*`. |\n\n### Twitter\n\nTo display tweets with Embetty, the Twitter environment variables [listed above](#configuration) need to be defined. Both tokens, the key and the secret can be obtained by creating a [Twitter app](https://apps.twitter.com/).\n\n## Testing the server setup\n\nThe setup can be tested by sending a request to the running server. If everything was set up correctly, JSON data and the HTTP status code `200` are returned.\n\n```sh\n$ curl -i http://localhost:8080/version\n$ curl -i http://localhost:8080/tweet/985882036777955328\n$ curl -i http://localhost:8080/video/youtube/m6UOo2YGbIE-poster-image\n```\n\n## Using Embetty with Google AMP ⚡️\n\nEmbetty server supports Google AMP ⚡️ out of the box via `\u003camp-iframe\u003e`:\n\nTweet:\n\n```html\n\u003camp-iframe width=\"200\" height=\"100\"\n  sandbox=\"allow-scripts allow-same-origin\"\n  layout=\"responsive\"\n  resizable\n  frameborder=\"0\"\n  src=\"https://your-site.com/path/to/embetty-server/tweet/1004988454978179072.amp\"\n\u003e\n  \u003cdiv overflow tabindex=0 role=button aria-label=\"\"\u003e\u003c/div\u003e\n\u003c/amp-iframe\u003e\n```\n\nVimeo:\n\n```html\n\u003camp-iframe width=\"200\" height=\"100\"\n  sandbox=\"allow-scripts allow-same-origin\"\n  layout=\"responsive\"\n  resizable\n  frameborder=\"0\"\n  src=\"https://your-site.com/path/to/embetty-server/video/vimeo/1084537.amp\"\n\u003e\n  \u003cdiv overflow tabindex=0 role=button aria-label=\"\"\u003e\u003c/div\u003e\n\u003c/amp-iframe\u003e\n```\n\nYouTube:\n\n```html\n\u003camp-iframe width=\"200\" height=\"100\"\n  sandbox=\"allow-scripts allow-same-origin\"\n  layout=\"responsive\"\n  resizable\n  frameborder=\"0\"\n  src=\"https://your-site.com/path/to/embetty-server/video/youtube/m6UOo2YGbIE.amp\"\n\u003e\n  \u003cdiv overflow tabindex=0 role=button aria-label=\"\"\u003e\u003c/div\u003e\n\u003c/amp-iframe\u003e\n```\n\nFacebook:\n\n```html\n\u003camp-iframe width=\"200\" height=\"100\"\n  sandbox=\"allow-scripts allow-same-origin\"\n  layout=\"responsive\"\n  resizable\n  frameborder=\"0\"\n  src=\"https://your-site.com/path/to/embetty-server/video/facebook/10156049485672318.amp\"\n\u003e\n  \u003cdiv overflow tabindex=0 role=button aria-label=\"\"\u003e\u003c/div\u003e\n\u003c/amp-iframe\u003e\n```\n\n## Contributing to Embetty\n\nSee [Contributing](./CONTRIBUTING.md).\n\n## License\n\nEmbetty server is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiseonline%2Fembetty-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheiseonline%2Fembetty-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiseonline%2Fembetty-server/lists"}