Added an index page the hits the API for some data
							parent
							
								
									b048fe1254
								
							
						
					
					
						commit
						a2e3ad84c1
					
				@ -0,0 +1,33 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <title>Cookie API</title>
 | 
			
		||||
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
 | 
			
		||||
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <h1>APIStar Cookies</h1>
 | 
			
		||||
    <div id="app">
 | 
			
		||||
        <ul>
 | 
			
		||||
            <li v-for="cookie in cookies">
 | 
			
		||||
                {{ cookie.name }}
 | 
			
		||||
            </li>
 | 
			
		||||
        </ul>
 | 
			
		||||
    </div>
 | 
			
		||||
    <script>
 | 
			
		||||
        let vm = new Vue({
 | 
			
		||||
            el: '#app',
 | 
			
		||||
            data: {
 | 
			
		||||
                cookies: []
 | 
			
		||||
            },
 | 
			
		||||
            created() {
 | 
			
		||||
                axios.get("http://localhost:5000/cookies").then(
 | 
			
		||||
                    (response) => {
 | 
			
		||||
                    this.cookies = response.data.data
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue