jkenzer / lwc-movie-database

LWC, Rollup, Vercel

Home Page:https://lwc-movie-database.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

LWC, Rollup, Vercel

https://lwc-movie-database.vercel.app

License:MIT License


Languages

Language:JavaScript 53.4%Language:HTML 40.2%Language:CSS 5.8%Language:Shell 0.6%