Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.
/ mrvl-web Public archive

🧚 (2022) Browse and manage your favourite Marvel comics. ReactJS 18.

License

Notifications You must be signed in to change notification settings

kkamara/mrvl-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marvel-moving

mrvl4.png

mrvl.png

mrvl2.png

mrvl3.png

mrvl-web

(2022) Browse and manage your favourite Marvel Comics. ReactJS 18.

Installation

cp .env.example .env
npm install

Usage

Update https://github.com/kkamara/mrvl-web/blob/main/src/constants.jsx to the following:

// export const ENV = 'prod'
export const ENV = 'local'

Start the server:

npm start
# The app works at the following full path including trailing `/`.
# http://localhost:3000/mrvl-web/

Code snippet

/** 
 * Return searchable paginated characters api response
 * @param {array} ids
 * @return {Promise}
 */
async getFavComics(ids) {
  const promises = []
  let comics = []

  for (const id of ids) {
    promises.push(new Promise(async resolve => {
      const comic = await this.getComic(id)
      resolve(comic.data.data.results[0])
    }))
  }

  await new Promise((resolve, reject) => {
    Promise.all(promises).then(data => 
      comics = data
      resolve()
    })  
    .catch(err => { throw err })
  })  
  return comics
}

Misc

See MRVL Desktop.

Each Marvel API key (see environment variables) has a request limit of 3000/day.

See ReactJS Boilerplate.

See PHP Scraper.

See NodeJS ReactJS Boilerplate.

See PHP ReactJS Boilerplate.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

BSD

About

🧚 (2022) Browse and manage your favourite Marvel comics. ReactJS 18.

Resources

License

Stars

Watchers

Forks