An open API service indexing awesome lists of open source software.

https://github.com/hotheadhacker/no-as-a-service

No-as-a-Service (NaaS) is a simple API that returns a random rejection reason. Use it when you need a realistic excuse, a fun “no,” or want to simulate being turned down in style.
https://github.com/hotheadhacker/no-as-a-service

api expressjs json

Last synced: 5 months ago
JSON representation

No-as-a-Service (NaaS) is a simple API that returns a random rejection reason. Use it when you need a realistic excuse, a fun “no,” or want to simulate being turned down in style.

Awesome Lists containing this project

README

          

# ❌ No-as-a-Service


No-as-a-Service Banner

Ever needed a graceful way to say “no”?
This tiny API returns random, generic, creative, and sometimes hilarious rejection reasons — perfectly suited for any scenario: personal, professional, student life, dev life, or just because.

Built for humans, excuses, and humor.



Sponsored by GitAds


This project is sponsored by GitAds.

You can get your GitHub repository sponsored too — create your account now.

---

## 🚀 API Usage

**Base URL**
```
https://naas.isalman.dev/no
```

**Method:** `GET`
**Rate Limit:** `120 requests per minute per IP`

### 🔄 Example Request
```http
GET /no
```

### ✅ Example Response
```json
{
"reason": "This feels like something Future Me would yell at Present Me for agreeing to."
}
```

Use it in apps, bots, landing pages, Slack integrations, rejection letters, or wherever you need a polite (or witty) no.

---

## 🛠️ Self-Hosting

Want to run it yourself? It’s lightweight and simple.

### 1. Clone this repository
```bash
git clone https://github.com/hotheadhacker/no-as-a-service.git
cd no-as-a-service
```

### 2. Install dependencies
```bash
npm install
```

### 3. Start the server
```bash
npm start
```

The API will be live at:
```
http://localhost:3000/no
```

You can also change the port using an environment variable:
```bash
PORT=5000 npm start
```

---

## 📁 Project Structure

```
no-as-service/
├── index.js # Express API
├── reasons.json # 1000+ universal rejection reasons
├── package.json
├── .devcontainer.json # VS Code / Github devcontainer setup
└── README.md
```

---

## 📦 package.json

For reference, here’s the package config:

```json
{
"name": "no-as-service",
"version": "1.0.0",
"description": "A lightweight API that returns random rejection or no reasons.",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "hotheadhacker",
"license": "MIT",
"dependencies": {
"express": "^4.18.2",
"express-rate-limit": "^7.0.0"
}
}
```

---

## ⚓ Devcontainer

If you open this repo in Github Codespaces, it will automatically use `.devcontainer.json` to set up your environment. If you open it in VSCode, it will ask you if you want to reopen it in a container.

---
## Projects Using No-as-a-Service

Here are some projects and websites that creatively integrate [no-as-a-service](https://naas.isalman.dev/no) to deliver humorous or programmatic "no" responses:

1. **[no-as-a-service-rust](https://github.com/ZAZPRO/no-as-a-service-rust)**
Rust implementation of this project.

2. **[CSG Admins](https://csg-admins.de)**
A system administration and gaming service hub using no-as-a-service to provide playful negative responses across some admin panels and commands.

3. **[FunnyAnswers - /no endpoint](https://www.funnyanswers.lol/no)**
A humor-focused API playground that includes a mirror or wrapper for no-as-a-service, perfect for developers exploring fun HTTP-based responses.

4. **[Gerador de Frases Aleatórias (pt-BR)](https://github.com/timeuz/frases-aleatorias)**
Uma reinterpretação em Python com frases em português, frontend e novas categorias.

5. **[NoAsAnApp](https://github.com/omar-jarid/NoAsAnApp)**
A simple native Android app calling no-as-a-service to provide negative responses.

6. **[How About No?](https://github.com/lloyd094/How-About-No-)**
A basic GUI using no-as-a-service as the backend. Built with docker in mind.

7. **[no-as-a-service-asp](https://github.com/sapph42/no-as-a-service)**
A straight-forward implementation of NaaS in ASP.NET Core
8. **[No as a Service - Raycast Extension](https://www.raycast.com/nedini/no-as-a-service)**
Get a random No from within Raycast. Just install the extension from the Raycast store, open Raycast, then type in 'Random No'. Raycast extension: [No as a Service](https://www.raycast.com/nedini/no-as-a-service).

9. **[No-as-a-Service - Slack App](https://github.com/pro100svitlo/no-as-a-service-slack-app)**
Get a random `No` from within Slack. [Install](https://slack.com/oauth/v2/authorize?client_id=2550998207090.10222067205218&scope=commands,chat:write&user_scope=) the app to your workspace and then use the `/no` command to get a random response.

10. **[Your Project Here?](https://github.com/YOUR_REPO)**
If you're using no-as-a-service in your project, open a pull request to be featured here!

---

> Want to use no-as-a-service in your own project? Check out the usage section in this README and start returning **"no"** like a pro.
---

## 👤 Author

Created with creative stubbornness by [hotheadhacker](https://github.com/hotheadhacker)

---

## 📄 License

MIT — do whatever, just don’t say yes when you should say no.