A simple Node.js + Express web application that generates random tasks for users using an external API. Built with EJS templating and styled with basic CSS for a clean and minimal UI.
- 🔄 Generates a random task on each refresh
- 🌐 Fetches tasks from an external API
- 📩 Demonstrates GET and POST request handling
- 🎨 Clean and simple user interface
- ⚡ Lightweight and beginner-friendly project
- Node.js
- Express.js
- EJS (Embedded JavaScript Templates)
- HTML / CSS
- Bored API (for random tasks)
This API provides random activities/tasks which are displayed to the user.
RANDOMTASKGENERATOR/
│── node_modules/
│
├── public/
│ └── styles/
│ └── main.css # Styling file
│
├── views/ # EJS templates
│
├── .gitignore
├── index.js # Main server file
├── package.json
└── package-lock.json
- Clone the repository:
git clone <your-repo-link>
- Navigate to the project folder:
cd RANDOMTASKGENERATOR
- Install dependencies:
npm install
- Run the server:
node index.js
- Open your browser and go to:
http://localhost:3000
-
The server is built using Express.js
-
When a user visits the page:
- A GET request is sent to fetch a random task from the API
- The task is rendered using EJS templates
-
If forms or interactions are used:
- A POST request handles user input and updates the UI accordingly
- Express server setup
- Routing (GET & POST requests)
- API integration using HTTP requests
- Server-side rendering with EJS
- Static file handling in Express
- Get random productivity ideas
- Find fun activities when bored
- Learn API integration basics
- Add task categories filter
- Save favorite tasks
- Add animations or better UI
- Convert into a full-stack app with database
Feel free to fork this project and improve it. Contributions are welcome!
This project is open-source and free to use.