Very small program that will receive an URL for a viaplay movie and will return the trailer from the movie database.
npm start
Now you can go to http://localhost:3000/trailer?url= to get the trailer
npm test
npm run test-watch
npm run lint
- Make parameter validation for the url
- Better error handling
- Some defensive code
- Unit tests for the trailer.client (didn't made it as it was harder than the remaining as I had to use something like rewire to mock the dependency from movieDB)
- Some light integration tests mocking only the external http requests
- Depending on the use of the server, a cache might be of interest