Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webpack Starter Kit</title>
<title>Adam's Travel Tracker</title>
</head>
<body>
<img src="./images/turing-logo.png" alt="turing logo">

<!-- Do not include the scripts.js or class files here - it is done by the webpack server -->
<!-- <img src="./images/turing-logo.png" alt="turing logo"> -->
<main>
<section class="traveler-view">
<aside class="traveler-sidebar"></aside>
<section class="traveler-main-display"></section>
</section>
</main>
<script src="bundle.js"></script>

</body>
</html>
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 23 additions & 6 deletions src/scripts.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
// This is the JavaScript entry file - your code begins here
// Do not delete or rename this file ********

// An example of how you tell webpack to use a CSS (SCSS) file
// import live here
import './css/styles.css';

// An example of how you tell webpack to use an image (also need to link to it in the index.html)
import './images/turing-logo.png'

// query selectors go here

// global variables used for data model here
let travelersRepo
let currentTraveler

//functions here
function apiCalls () {
getApiData()
loadHandler()
}

function getApiData() {
let getAllTravelers = fetch('http://localhost:3001/api/v1/travelers ')
}


function loadHandler() {
console.log("this loaded")
}

console.log('This is the JavaScript entry file - your code begins here.');
//event listeners here
window.addEventListener("load", apiCalls())