Open
Description
Add new feature to generate random Nano-Id
Example : If some one leaves blank the input phrase text field so the backend web API should generates the random Nano-Id and append that Id in the response body
{
"inputURL" : "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText" : ""
}
Here we see the input text as blank so the post method should generate a Nano-ID (you can use nano id npm package) .
{
"_id": "60b65180e14f372af0e298bb",
"inputURL": "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText": "IRFa-VaY2b",
"outputText": "localhost:3000/IRFa-VaY2b",
"__v": 0
}
Here we see input text get the random id of 10 digts