movie-art

node v8.17.0
version: 2.0.3
endpointsharetweet
/* Demo */ const movieArt = require('movie-art') const movie = 'Crash' movieArt(movie).then(console.log) /* End Demo */ /* Endpoint for testing responses */ exports.endpoint = async (request, response) => { // Read request const url = require('url') const req = url.parse(request.url, true) // Use GET parameters as search options ?size=...&year=... const {search} = req.query const options = req.query // Search and respond with results (fallback to default if no search provided) response.end( JSON.stringify( await movieArt( search || movie, options ) ) ) }
Loading…

no comments

    sign in to comment