Skip to content

jkenzer/lwc-movie-database

Repository files navigation

LWC Movie Database Client

You can view this deployed at https://lwc-movie-database.vercel.app.

Inspired by the Coding Train. Taking his vanilla version and using LWC Open Source to replicate it.

All movie info sourced from The Movie Database.

Project Setup

From lwc.dev, I used

$ npm init lwr
$ npm install

I then added the code related to using Rollup.

$ npm install --save-dev lwc rollup @lwc/rollup-plugin @rollup/plugin-replace

Make sure to also add the rollup.config.js, lwc.config.json and src/main.js file.

After the rollup build, I included the main.js from the dist folder into the index.html page I manually created in that folder.

Deploy

This project is setup to be deployed to vercel. It uses a serverless function in the /api directory. Check the vercel docs for more info.

You will also need an api key from The Movie Database. Move the sample.env file to .env and add your key there.