Skip to content

Commit

Permalink
feat: add heroku support to backend & frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
lennysgarage committed May 12, 2022
1 parent b9943d8 commit 04e2f9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions frontend/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ hideLoading();
function sendRequest() {
return async function(e) {
e.preventDefault();
let link = document.getElementById('username').value;
let link = document.getElementById('link').value;
if (link !== '') {
showLoading();
// development: http://localhost:8080/api?username=${username}
// production: https://letterboxd-picker-api.herokuapp.com/api?username=${username}
const response = await fetch(`http://localhost:8080/api?src=${link}`);
// development: http://localhost:8080/api?src=${link}
// production: https://letterboxd-scraper.herokuapp.com/api?src=${link}
const response = await fetch(`https://letterboxd-scraper.herokuapp.com/api?src=${link}`);
hideLoading();
let movie = document.getElementById("movie-container");
if (response.status === 200) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

<div class="row d-flex justify-content-center">
<div class="col-md-6">
<form id="submitUsername">
<form id="submitLink">
<div class="input-group input-group-lg mb-4">
<input id="username" type="text" class="form-control" placeholder="Ex: https://letterboxd.com/lennysgarage/watchlist/">
<input id="link" type="text" class="form-control" placeholder="Ex: https://letterboxd.com/lennysgarage/watchlist/">
<button id="submitButton" type="submit" class="btn btn-outline-secondary">
SUBMIT
</button>
Expand Down

0 comments on commit 04e2f9a

Please sign in to comment.