Skip to content
BlackGloryPublic

About

🌳 Web-friendly microservice for generating unpredictable UIDs.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

160 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UID

An UUID generator with HTTP.

Install

Install from source

git clone https://github.com/BlackGlory/uid
cd uid
yarn install
yarn build
yarn bundle
yarn --silent start

Build from source

git clone https://github.com/BlackGlory/uid
cd uid
yarn install
yarn build
yarn docker:build

Recipes

docker-compose.yml

version: '3.8'

services:
  uid:
    image: 'blackglory/uid'
    restart: always
    ports:
      - '8080:8080'

API

generate Nano ID

GET /nanoid

Return a Nano ID as a text.

Example

curl
curl http://localhost:8080/nanoid
JavaScript
await fetch('http://localhost:8080/nanoid')
  .then(res => res.text())

generate UUID

GET /uuid

Return a uuid as a text.

Example

curl
curl http://localhost:8080/uuid
JavaScript
await fetch('http://localhost:8080/uuid')
  .then(res => res.text())

Environment variables

UID_HOST, UID_PORT

The environment variablesUID_HOSTandUID_PORTcan be used to set the address and port that the server listens to. The default values are localhost and 8080.

Clients

About

🌳 Web-friendly microservice for generating unpredictable UIDs.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages