Whisper is a full-stack web application built using Node.js, Express.js, and EJS that fetches and displays anonymous secrets from an external API in a clean and minimal UI.
This project demonstrates:
- Server-side rendering with EJS
- Fetching data from an external API using Axios
- Serving static files with Express
- Fetches random secrets from a public API
- Displays the secret along with the anonymous username
- Clean UI using custom CSS
- Simple and beginner-friendly project structure
- Backend: Node.js, Express.js
- Templating Engine: EJS
- HTTP Client: Axios
- Frontend: HTML, CSS
- API Used: Secrets API (App Brewery)
Whisper-Secret-Sharing-Platform/
│
├── public/
│ ├── images/
│ │ └── whisper-img.jpg
│ └── styles/
│ └── main.css
│
├── views/
│ └── index.ejs
│
├── index.js
├── package.json
├── package-lock.json
└── README.md
Follow these steps to run the project locally:
git clone https://github.com/your-username/Whisper-Secret-Sharing-Platform.gitcd Whisper-Secret-Sharing-Platformnpm installnode index.jshttp://localhost:3000
-
The server listens on port 3000
-
When the user visits
/, the app:- Sends a GET request to the Secrets API using Axios
- Receives a random secret and username
- Passes the data to
index.ejs
-
EJS dynamically renders the secret on the page
https://secrets-api.appbrewery.com/random
- Understanding Express server setup
- Using Axios for API calls
- Passing data from backend to EJS templates
- Serving static assets (CSS, images)
- Error handling with
try-catch