I have typed in ‘npm install’, I have typed ‘npm run webpack’ both have worked fine. But how do I then open the index file? it says follow these commands with ‘open index.html’.
This is not working… How do I view it? I can click on the file in my file explorer but this opens the HTML file not on the localhost.
How do I check that the SQL functions are working?
Hello, I am kind of lost on this project. I downloaded the zip file, but the gold_medals.sqlite file is empty, so I cannot run it in DB Browser SQLite to test my queries. Any help would be much appreciated.
Also, are there any tips for writing the SQL strings in the sql.js file. I found that if I use different lines, I get major syntax errors.
You can run “open index.html” in the terminal, from the projects root folder, in order to open the file.
Once you have completed “createCountryTable”, and createGoldMedalTable functions, and restart the server, you should be able to see the data in the website (as well as the gold_medals.sqlite file via the DB Browser for SQLite program).
Once you have finished writing the function, you can restart the server, and run “npm test” in your terminal, from the projects root folder.
In the test output you can check out if the functions passed the tests.
Just as a clarification for others that have just started with this project, you need to finish the two first functions and restart the server, before there will be any data in the “gold_medals.sqlite” file.
For anybody experiencing the issue described above, there are two CSV files in the ‘data’ folder of the starter code. Within DB browser, choose File > Import > Table from CSV file for each file.
Once imported, you can test your solutions from the Execute SQL tab.