https://github.com/sohamsshah/pr-code-roaster
PR Code roaster - Fun app backend
https://github.com/sohamsshah/pr-code-roaster
Last synced: 9 months ago
JSON representation
PR Code roaster - Fun app backend
- Host: GitHub
- URL: https://github.com/sohamsshah/pr-code-roaster
- Owner: sohamsshah
- Created: 2025-02-01T06:38:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T11:01:22.000Z (over 1 year ago)
- Last Synced: 2025-02-12T08:45:24.818Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.63 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Roaster 🔥
A fun Node.js application that uses OpenAI to provide sarcastic and witty comments about your code.
## Setup
1. Clone this repository
2. Install dependencies:
```bash
npm install
```
3. Copy `.env.example` to `.env` and add your OpenAI API key:
```bash
cp .env.example .env
```
4. Edit `.env` and add your OpenAI API key
## Usage
1. Start the server:
```bash
npm start
```
2. Send a POST request to `/roast` with your code:
```bash
curl -X POST http://localhost:3000/roast \
-H "Content-Type: application/json" \
-d '{"code": "function doStuff() { var a = 1; var b = 2; return a + b; }"}'
```
The API will return a JSON response with a sarcastic roast of your code!