A playful AI-powered news generator that turns trivial events into absurd broadcast headlines.
Backend/server.js- Express backend serving the frontend and/api/generate-news.Frontend/index.html- Static UI and AI prompt/frontend logic..env.example- Example environment file for the secret API key.
-
Copy
.env.exampleto.env:copy .env.example .env
-
Add your Groq API key to
.env:GROQ_API_KEY=your_groq_api_key_here -
Install dependencies from the project root:
npm install
-
Start the app:
npm start
-
Open the app:
http://localhost:3000
This app is ready for deployment to any Node.js-compatible host.
- The root
package.jsonincludes astartscript:npm startrunsBackend/server.js
- The backend serves the static frontend automatically.
- Keep the
.envfile secret and do not commit it.
- If your browser opens Live Server on port
5500, usehttp://localhost:3000instead. - Make sure
GROQ_API_KEYis defined in.envbefore starting the server.