Movie-Searcher is an application that will help you to search movies online and add them as your favourites in Salesforce. The application is built using Lightning Web Components.
- Go to OMDb API website and familiarise with the api.
- Click on API Key tab, select FREE as Account Type and your email address and click Submit.
- Check your inbox for the api key.
- Set up your environment. Follow the steps in the Quick Start: Lightning Web Components Trailhead project. The steps include:
- Enable Dev Hub in your Trailhead Playground
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Salesforce Extension Pack for Visual Studio Code.
- Authenticate to your hub org and provide it with an alias as shown below:
sfdx force:auth:web:login -d -a myhuborg
- Clone the movie-searcher-app repository:
git clone https://github.com/shyamravinair86/movie-searcher-app.git
git cd movie-searcher-app
- Create a scratch org and provide it with an alias:
sfdx force:org:create -s -f config/project-scratch-def.json -a movie-searcher-app
- Push the app to your scratch org:
sfdx force:source:push
- Assign the MovieSearcher permission set to the default user:
sfdx force:user:permset:assign -n MovieSearcher
- Export sample data to your dev hub:
sfdx force:data:tree:import --sobjecttreefiles data/My_Favourite_Movie__c.json
- Open the scratch org:
sfdx force:org:open
- In your project directory, go to force-app/main/default/labels and edit CustomLabels.labels-meta.xml file. Enter the api key after
=
in the value attribute:
<?xml version="1.0" encoding="UTF-8"?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
<labels>
<fullName>OMDB_API_URL</fullName>
<language>en_US</language>
<protected>true</protected>
<shortDescription>OMDB_API_URL</shortDescription>
<value>http://www.omdbapi.com/?apikey=</value>
</labels>
</CustomLabels>
- Run the deploy command to push your changes to the Dev Hub:
sfdx force:source:push