Rene Luria 0dac1a5505 build: optimize Docker image with multi-stage build and security improvements
- Implement multi-stage build to reduce final image size
- Install only production dependencies with npm ci --only=production
- Clean npm cache to reduce image size
- Improve layer caching by copying package files before application code
- Update package version from 1.0.0 to 1.0.1
2025-10-09 10:11:38 +02:00
2025-05-01 21:09:55 +05:30
2025-09-02 10:30:08 +02:00
2025-09-02 10:31:59 +02:00
2025-05-02 17:07:46 +02:00
2025-05-01 16:59:49 +05:30

No-as-a-Service

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

local modifications

  • answer on / instead of /no
  • add /health endpoint for kube readiness probe
  • add Dockerfile to build this sh*t
  • kustomization in deploy directory (use your own registry)

the deploy runs non root, no caps, read only file system, network policy and sh*t ftw

intro

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

GET /no

Example Response

{
  "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? Its lightweight and simple.

1. Clone this repository

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

2. Install dependencies

npm install

3. Start the server

npm start

The API will be live at:

http://localhost:3000/no

You can also change the port using an environment variable:

PORT=5000 npm start

📁 Project Structure

no-as-service/
├── index.js            # Express API
├── reasons.json        # 1000+ universal rejection reasons
├── package.json
└── README.md

📦 package.json

For reference, heres the package config:

{
  "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"
  }
}

👤 Author

Created with creative stubbornness by hotheadhacker


📄 License

MIT — do whatever, just dont say yes when you should say no.

Description
No description provided
Readme 1.2 MiB
Languages
JavaScript 89.5%
Dockerfile 10.5%