/idgen

A maximum of 9999999 IDs are generated in an hour

Primary LanguageGo

id generator

A maximum of 9999999 IDs are generated in an hour

Deployment

Docker deployment is recommended, the simple command:

docker run -d -p 8080:80 -e redis=redis://172.16.1.1 uvaa/idgen

NOTE: redis must be defined

Environment Variables

When you start the image, you can adjust the configuration of the instance by passing one or more environment variables on the docker run command line

redis

The id was generated by the redis Incr command

Use it

Be sure to use the GET request to get id

curl 'http://abc.com/10'

104510840000001

the path 10 is the prefix, you can put any number