A simple quiz application built with Node.js, Express, EJS, and PostgreSQL. The app quizzes users on the capital cities of various countries.
- Users can input their answers to capital city questions.
- The app provides feedback on whether the answer was correct.
- The total score is displayed to the user.
- Node.js installed
- PostgreSQL installed and running
- Clone the repository
- Install dependencies:
npm install
- Set up the PostgreSQL database:
- Create a database named
world
. - Create a table named
capitals
with columnscountry
andcapital
. - Insert data into the table from capitals.csv.
- Create a database named
- Start the server:
nodemon index.js
- Visit
http://localhost:3000
in your browser to play the quiz.
- Enter capital of the displayed country
- Click submit to check
- View your total and feedback on each submission
- Node.js
- Express
- EJS
- PostgreSQL
- CSS