https://github.com/amarok24/omdb-search
JavaScript demo of asynchronous XHR and the free OMDb API (Open Movie Database).
https://github.com/amarok24/omdb-search
javascript javascript-demo javascript-learning omdb-search open-movie-database
Last synced: 9 months ago
JSON representation
JavaScript demo of asynchronous XHR and the free OMDb API (Open Movie Database).
- Host: GitHub
- URL: https://github.com/amarok24/omdb-search
- Owner: Amarok24
- License: mpl-2.0
- Created: 2020-06-23T13:48:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T15:35:57.000Z (over 5 years ago)
- Last Synced: 2025-02-16T07:41:23.561Z (11 months ago)
- Topics: javascript, javascript-demo, javascript-learning, omdb-search, open-movie-database
- Language: JavaScript
- Homepage:
- Size: 312 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OMDb-search  
JavaScript demo of asynchronous XHR and the free OMDb API (Open Movie Database).
* No dependencies, vanilla JavaScript + HTML5.
* It uses JavaScript modules so it won't work offline in a browser. Start a live-server or copy it directly to a server and open the index.html file.
### OMDb API key
You will need your own OMDb API key, get it from https://www.omdbapi.com/apikey.aspx
### Demo online
https://amarok24.github.io/OMDb-search/src/
***
SCREENSHOT
[see here](./omdb-search-demo__2020-06-25.png)
TROUBLESHOOTING
You may get one of those errors in the browser console and the script won't run:
Loading module from “xxxxxxx/modules/main.mjs” was blocked because of a disallowed MIME type (“”).
Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
In such cases the server does not know the MIME type of JavaScript modules. A simple renaming to .js (instead of .mjs) won't help. If you are running an Apache server put this into your .htaccess file:
```apache
RewriteEngine on
AddType text/javascript js mjs
```