{"id":43337064,"url":"https://github.com/alexthemaster/pokole","last_synced_at":"2026-02-02T00:37:48.390Z","repository":{"id":42513936,"uuid":"199904686","full_name":"alexthemaster/pokole","owner":"alexthemaster","description":"URL shortening done using Node.js and PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-07-22T05:37:45.000Z","size":1356,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-22T13:27:19.706Z","etag":null,"topics":["bitly","js-url-shortener","pokole","postgresql","tinyurl","url","url-shortener","yourls"],"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/alexthemaster.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-31T17:56:56.000Z","updated_at":"2024-12-16T15:15:07.000Z","dependencies_parsed_at":"2025-08-22T13:27:24.070Z","dependency_job_id":"f41e649b-1a76-47ee-9f68-e399a34bb567","html_url":"https://github.com/alexthemaster/pokole","commit_stats":{"total_commits":108,"total_committers":6,"mean_commits":18.0,"dds":0.5277777777777778,"last_synced_commit":"299f462dea81b5bef6c238b624b2ef04118b024c"},"previous_names":["penfoldium/pokole"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alexthemaster/pokole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fpokole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fpokole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fpokole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fpokole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexthemaster","download_url":"https://codeload.github.com/alexthemaster/pokole/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fpokole/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28997111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T23:10:54.274Z","status":"ssl_error","status_checked_at":"2026-02-01T23:10:47.298Z","response_time":56,"last_error":"SSL_read: 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":["bitly","js-url-shortener","pokole","postgresql","tinyurl","url","url-shortener","yourls"],"created_at":"2026-02-02T00:37:48.237Z","updated_at":"2026-02-02T00:37:48.380Z","avatar_url":"https://github.com/alexthemaster.png","language":"TypeScript","readme":"![Pokole](https://i.imgur.com/jGBJmfr.png)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/alexthemaster/pokole.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/alexthemaster/pokole/context:javascript)\n\n# 🔗 Pokole\n\nPokole is a simple and fast URL shortener that uses NodeJS and PostgreSQL.\n\n## 🤔 Meaning\n\nPokole stands for 'short' in Hawaiian.\n\n## 💻 Features\n\n- Simplicity\n- Ease of use\n- In-depth statistics\n- Written in TypeScript to ensure fast and bug-free code\n\n## 🐳 Docker\n\nUsing Pokole in Docker is easier, faster and more convenient! Head over to [Docker Hub](https://hub.docker.com/r/alexthemaster/pokole) for more information. Web UI built in!\n\n## 📝 Requirements\n\n- [Node.js](https://nodejs.org/en/) (12 or newer)\n- [node-gyp](https://github.com/nodejs/node-gyp) (required for building bcrypt)\n- [PostgreSQL](https://postgresql.org) (latest)\n\n## 🔨 Usage\n\nHere's an easy-to-follow tutorial:\n\n- Install Node, node-gyp and PostgreSQL\n- Create a new folder and install the package inside via npm (`npm install pokole`) or yarn (`yarn add pokole`)\n- Create a JavaScript file inside the folder (e.g. `server.js`)\n- Import the Pokole class from the package, create a new instance of the class, provide the required configuration and call the `.start()` function! You can find a sample script below:\n\n```js\n// We import the Pokole class from the Pokole package\nconst { Pokole } = require(\"pokole\");\n\n// You need to provide an object containing crucial information for the package, so we define it here\nconst config = {\n  // The database connection information\n  db: {\n    // The database user\n    user: \"alexthemaster\",\n    // The password used by the PostgreSQL user\n    password: \"eee23EfgZ\",\n    // The URL PostgreSQL can be accessed from\n    host: \"localhost\",\n    // The name of the database to use from PostgreSQL\n    database: \"pokole\",\n    // The port PostgreSQL uses (defaults to 5432)\n    port: 5432,\n  },\n  // The URL the Pokole can be accessed from\n  URL: \"localhost\",\n  server: {\n    //  The port Pokole should run on, (defaults to 80)\n    port: 80,\n  },\n  // The JWT (JSON Web Token) secret you want to use - make sure to keep this private, as this is what's used to encrypt user tokens\n  jwtSecret: \"33HdAiM$4zGs\",\n  // Whether or not registration is enabled, defaults to true\n  registration: true,\n};\n\n// We create a new Pokole instance, provide it with the required options and call the start function\nnew Pokole(config).start();\n```\n\n⚠ We recommend using a process manager such as [PM2](https://pm2.keymetrics.io) to keep the script running!\n\n## 📂 Hosting Static Files\n\nIf you want to host static files alongside Pokole, create a folder called `static` in the folder above and Pokole will serve the files inside this folder.\n\n[Pokole-Web](https://github.com/alexthemaster/pokole-web) is the default web dashboard included in the Docker build.\n\n## 🕸 Routes / API\n\n| Endpoint            | Type   | Headers                                                         | Body                                                    | Description                                                                                     | Returns (JSON)                                                   | Requires authentication |\n| ------------------- | ------ | --------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------- |\n| /api/register       | GET    |                                                                 |                                                         | Check if registration is possible                                                               | `{ enabled: boolean }`                                               | No                      |\n| /api/register       | POST   | `Content-Type: \"application/json\"`                              | `{ email: string, username: string, password: string }` | Register an account                                                                             | `{ success: string } \\| { error: string }`                               | No                      |\n| /api/login          | POST   | `Content-Type: \"application/json\"`                              | `{ username: string, password: string }`                | Login to an existing account                                                                    | `{ token: string, expiresIn: number } \\| error: string`          | No                      |\n| /api/shorten        | POST   | `Authorization: Bearer token, Content-Type: \"application/json\"` | `{ url: string, custom?: string }`                      | Shorten an URL                                                                                  | `{ success: string, URL: link } \\| error: string`                | Yes                     |\n| /api/me/links       | GET    | `Authorization: Bearer token`                                   |                                                         | Returns an array containing the list of your shortened URL's and and array of statistics for it | `{ longURL: link, shortURL: link, created_on: date, stats: [] }` | Yes                     |\n| /api/me/links/:link | DELETE | `Authorization: Bearer token, Content-Type: \"application/json\"` |                                                         | Delete a shortlink                                                                              | `{ success: string } \\| { error: string }`                       | Yes                     |\n\nLegend: `?` means the header is optional; `|` means OR; the string after `:` in the Returns column is the type of the returned object\n\nNote: the token is only valid for an hour, so you will have to request a new one after that!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexthemaster%2Fpokole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexthemaster%2Fpokole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexthemaster%2Fpokole/lists"}