A simple website allows the user to get albums.
The objective of the project is to practice using get requests and apply separation of concerns.
- JavaScript
- HTML5
- CSS3
- VSC code
- clone the repo.
npm install
const getAlbums = async () => {
const url = 'https://jsonplaceholder.typicode.com/albums';
try {
const res = await fetch(url);
if (!res.ok) {
throw new Error(`Failed to fetch albums with status : ${res.status}`);
}
const albums = await res.json();
return albums;
} catch (err) {
console.error(err);
}
};
export default getAlbums;
List of features ready and Todos for future development
To-do list:
Project is: in progress