https://github.com/yatozuki/world-quiz
World Capitals Quiz is a simple app built with HTML, CSS, JS, Express.js, EJS, and PostgreSQL. Users answer questions about world capitals, with data stored in PostgreSQL and scores tracked in JavaScript.
https://github.com/yatozuki/world-quiz
css ejs-template-engine express-js html5 javascript node-js postgresql
Last synced: 3 months ago
JSON representation
World Capitals Quiz is a simple app built with HTML, CSS, JS, Express.js, EJS, and PostgreSQL. Users answer questions about world capitals, with data stored in PostgreSQL and scores tracked in JavaScript.
- Host: GitHub
- URL: https://github.com/yatozuki/world-quiz
- Owner: yatozuki
- Created: 2025-01-04T01:17:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-04T10:41:14.000Z (over 1 year ago)
- Last Synced: 2025-01-25T22:26:15.369Z (over 1 year ago)
- Topics: css, ejs-template-engine, express-js, html5, javascript, node-js, postgresql
- Language: JavaScript
- Homepage:
- Size: 1.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# World Capitals Quiz









---
## 📝 Description
This is a simple World Capitals Quiz application built using **HTML**, **CSS**, **JavaScript**, **Express.js**, **EJS** and **PostgreSQL**. The quiz allows users to answer questions about world capitals. While the quiz tracks scores in the client-side JavaScript, the capitals data is stored in a PostgreSQL database.
This project aims to provide an engaging quiz experience where users can test their knowledge of world capitals.
---
## 🚀 Features
- **Client-side Score Tracking**: The user's score is tracked locally in the browser using JavaScript.
- **Capitals Data**: All capitals data is stored and served from a PostgreSQL database.
---
## 🛠️ Technologies Used
- **Frontend**: HTML5, CSS3, JavaScript, EJS
- **Backend**: Node.js, Express.js
- **Database**: PostgreSQL
---
## 💻 Setup Instructions
### 1. Clone the repository:
```
git clone https://github.com/yatozuki/world-quiz.git
```
### 2. Navigate to the project directory:
```
cd world-quiz
```
### 3. Install dependencies:
```
npm install
```
### 4. Set up PostgreSQL:
- Create a PostgreSQL database and configure the connection in `index.js` with your credentials.
- Inside the `data/` folder, you will find a `database.sql` file.
- Open the file and run it in your PostgreSQL instance to create the required tables and insert the capitals data.
```bash
psql -U postgres -h localhost -d world -f data/capitals.sql
```
### 5. Run the application:
```
nodemon index.js
```
### 6. Open the website in your browser:
```
localhost:3000
```
## 🤝 Contributing
I welcome contributions from everyone! If you have ideas for improvements, new features, or spot any issues, feel free to open a pull request or raise an issue. Your suggestions and efforts to enhance the project are greatly appreciated!
---
## 🛡️ License
This project is licensed under the MIT License. This means you are free to:
- **Use**: You can use the project for personal or commercial purposes.
- **Modify**: You can make changes to the code as needed.
- **Distribute**: You can share the project, either in its original state or with modifications, with others.
However, all usage, modification, and distribution must include proper attribution to the original authors. For more details, see the [MIT License](https://opensource.org/licenses/MIT).