views/
: Contains the HTML file for the web page.controllers/
: Contains the controller for data fetching logic.routes/
: Contains the API route definitions.app.js
: Main server setup.package.json
: Node.js project configuration.README.md
: Overview, purpose, and solution descriptions.
- Setting Up the Server and Basic Routing- to set up a basic Node.js server. It establishes a foundation for handling HTTP requests and routing within the application.
- Creating a Route and Serving an HTML Page- to showcase your skills in setting up routes to render HTML content, providing a user-friendly interface for the web application.
- Fetching and Rendering API Data on the Web Page- shows proficiency in manipulating the Document Object Model (DOM) and updating content dynamically.
public/index.html
: Provides a simple web page layout.controllers/dataController.js
: Handles data fetching logic from a public API.routes/api.js
: Defines API routes for data retrieval.server.js
: Sets up the Express server and serves the web page.
- The web application fetches data from the JSONPlaceholder API using asynchronous HTTP requests.
- The fetched data is displayed on the web page in styled cards.
- Routes are organized using separate controller and route files.
- Clone this repository:
git clone https://github.com/imalisusan/dawit-interview
- Navigate to the project directory:
cd dawit
- Install dependencies:
npm install
- Start the server:
node ./bin/www
- Open your browser and visit:
http://localhost:3000
This project is licensed under the MIT License - see the LICENSE file for details.