Skip to content

just-doodle/roastra-web-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤡 roastra-web-api

This is a simple web-api for npm/roastra

⚙️ Setup

  1. Clone this Repo
git clone https://github.com/just-doodle/roastra-web-api.git
  1. Install dependencies
npm install
  1. Run server locally
npm run start

You can configure port in .env. Default port is 8000

🔥 Usage

After starting server, open

localhost:8000/roast/<name>
Parameter Description Optional Default
name Name of the person (or any noun) True "You"
?plural To set if name is plural True false

🔨 Examples

EXAMPLE 1
localhost:8000/roast/RockyGangsters?plural=true

/* RESPONSE
{
  "sentance": "RockyGangsters are diseased as a inferior crapload of ignorant snake scrotum",
  "name": "RockyGangsters"
}
*/
EXAMPLE 2
localhost: 8000 / roast / Rocky;

/* RESPONSE
{  
  "sentance": "Rocky is detestable as a infernal horde of naughty donkey toenails",
  "name": "Rocky"
}
*/
EXAMPLE 3
localhost: 8000 / roast;

/* RESPONSE
{
  "sentance": "You is stinky as a dirty pile of vile horse stench",
  "name": "You"
}
*/

🌨️ Deploy

You can deploy this to Heroku or Vercel or, Clone this project and deploy somewhere else!

Deploy to Heroku

Deploy with Vercel

💪 Support

Support this project by ⭐ Starring this Repo or buy me a coffee!

Buy Me A Coffee