Check out the website here!
This is a web application that serves as a quiz game for identifying flags stored in a PostgreSQL database. Built with -
Note
Windows does not display flag images for emoji. Instead, Windows will show you the country code which looks this: "๐ฆ๐ซ" :
So as a Windows user, the easiest way to see the flags is simply to use the Mozilla Firefox browser (instead of Chrome).
Firefox displays flags just fine!
- Tech Stack
- Features
- Dependencies
- Getting Started
- Database Schema
- Usage
- Flags
- Cheat Sheet for Country Emojis
- License
- Node.js: JavaScript runtime environment for executing JavaScript code server-side.
- Express.js: A web application framework for Node.js used for building web applications and APIs.
- EJS (Embedded JavaScript): Templating engine for generating HTML markup with plain JavaScript.
- PostgreSQL: Open-source relational database system for storing flag data.
- Body-parser: Middleware for parsing incoming request bodies in Express.
- pg (node-postgres): A PostgreSQL client for Node.js used to interact with the PostgreSQL database.
- dotenv: A zero-dependency module that loads environment variables from a
.env
file intoprocess.env
.
- Users can play a quiz game where they are presented with random flags and must input the corresponding country name.
- The application keeps track of the total score, displaying it to the user after each guess.
- Utilizes PostgreSQL as the database backend to store flag data.
- Express.js: A web application framework for Node.js used for building web applications and APIs.
- Body-parser: Middleware for parsing incoming request bodies in Express.
- pg (node-postgres): A PostgreSQL client for Node.js used to interact with the PostgreSQL database.
- dotenv: A zero-dependency module that loads environment variables from a
.env
file intoprocess.env
.
-
Clone this repository to your local machine.
-
Install dependencies using
npm install
. -
Set up a PostgreSQL database and populate it with flag data.
-
Create a
.env
file in the root directory and add your database credentials:DB_USER=your_username DB_HOST=your_host DB_DATABASE=your_database DB_PASSWORD=your_password DB_PORT=your_port
-
Run the application using npm start.
-
Access the application in your web browser at http://localhost:3000 .
The database should contain a table named flags with columns representing flag data, such as name, image_url, etc.
- Visit the homepage (/) to start the quiz game.
- Input the corresponding country name for the presented flag and submit your answer.
- The application will indicate whether your answer is correct and display the total score.
- Continue playing to test your knowledge of flags!
ico | shortcode | ico | shortcode | ||
---|---|---|---|---|---|
top | ๐ฆ๐จ | :ascension_island: |
๐ฆ๐ฉ | :andorra: |
top |
top | ๐ฆ๐ช | :united_arab_emirates: |
๐ฆ๐ซ | :afghanistan: |
top |
top | ๐ฆ๐ฌ | :antigua_barbuda: |
๐ฆ๐ฎ | :anguilla: |
top |
top | ๐ฆ๐ฑ | :albania: |
๐ฆ๐ฒ | :armenia: |
top |
top | ๐ฆ๐ด | :angola: |
๐ฆ๐ถ | :antarctica: |
top |
top | ๐ฆ๐ท | :argentina: |
๐ฆ๐ธ | :american_samoa: |
top |
top | ๐ฆ๐น | :austria: |
๐ฆ๐บ | :australia: |
top |
top | ๐ฆ๐ผ | :aruba: |
๐ฆ๐ฝ | :aland_islands: |
top |
top | ๐ฆ๐ฟ | :azerbaijan: |
๐ง๐ฆ | :bosnia_herzegovina: |
top |
top | ๐ง๐ง | :barbados: |
๐ง๐ฉ | :bangladesh: |
top |
top | ๐ง๐ช | :belgium: |
๐ง๐ซ | :burkina_faso: |
top |
top | ๐ง๐ฌ | :bulgaria: |
๐ง๐ญ | :bahrain: |
top |
top | ๐ง๐ฎ | :burundi: |
๐ง๐ฏ | :benin: |
top |
top | ๐ง๐ฑ | :st_barthelemy: |
๐ง๐ฒ | :bermuda: |
top |
top | ๐ง๐ณ | :brunei: |
๐ง๐ด | :bolivia: |
top |
top | ๐ง๐ถ | :caribbean_netherlands: |
๐ง๐ท | :brazil: |
top |
top | ๐ง๐ธ | :bahamas: |
๐ง๐น | :bhutan: |
top |
top | ๐ง๐ป | :bouvet_island: |
๐ง๐ผ | :botswana: |
top |
top | ๐ง๐พ | :belarus: |
๐ง๐ฟ | :belize: |
top |
top | ๐จ๐ฆ | :canada: |
๐จ๐จ | :cocos_islands: |
top |
top | ๐จ๐ฉ | :congo_kinshasa: |
๐จ๐ซ | :central_african_republic: |
top |
top | ๐จ๐ฌ | :congo_brazzaville: |
๐จ๐ญ | :switzerland: |
top |
top | ๐จ๐ฎ | :cote_divoire: |
๐จ๐ฐ | :cook_islands: |
top |
top | ๐จ๐ฑ | :chile: |
๐จ๐ฒ | :cameroon: |
top |
top | ๐จ๐ณ | :cn: |
๐จ๐ด | :colombia: |
top |
top | ๐จ๐ต | :clipperton_island: |
๐จ๐ท | :costa_rica: |
top |
top | ๐จ๐บ | :cuba: |
๐จ๐ป | :cape_verde: |
top |
top | ๐จ๐ผ | :curacao: |
๐จ๐ฝ | :christmas_island: |
top |
top | ๐จ๐พ | :cyprus: |
๐จ๐ฟ | :czech_republic: |
top |
top | ๐ฉ๐ช | :de: |
๐ฉ๐ฌ | :diego_garcia: |
top |
top | ๐ฉ๐ฏ | :djibouti: |
๐ฉ๐ฐ | :denmark: |
top |
top | ๐ฉ๐ฒ | :dominica: |
๐ฉ๐ด | :dominican_republic: |
top |
top | ๐ฉ๐ฟ | :algeria: |
๐ช๐ฆ | :ceuta_melilla: |
top |
top | ๐ช๐จ | :ecuador: |
๐ช๐ช | :estonia: |
top |
top | ๐ช๐ฌ | :egypt: |
๐ช๐ญ | :western_sahara: |
top |
top | ๐ช๐ท | :eritrea: |
๐ช๐ธ | :es: |
top |
top | ๐ช๐น | :ethiopia: |
๐ช๐บ | :eu: :european_union: |
top |
top | ๐ซ๐ฎ | :finland: |
๐ซ๐ฏ | :fiji: |
top |
top | ๐ซ๐ฐ | :falkland_islands: |
๐ซ๐ฒ | :micronesia: |
top |
top | ๐ซ๐ด | :faroe_islands: |
๐ซ๐ท | :fr: |
top |
top | ๐ฌ๐ฆ | :gabon: |
๐ฌ๐ง | :gb: :uk: |
top |
top | ๐ฌ๐ฉ | :grenada: |
๐ฌ๐ช | :georgia: |
top |
top | ๐ฌ๐ซ | :french_guiana: |
๐ฌ๐ฌ | :guernsey: |
top |
top | ๐ฌ๐ญ | :ghana: |
๐ฌ๐ฎ | :gibraltar: |
top |
top | ๐ฌ๐ฑ | :greenland: |
๐ฌ๐ฒ | :gambia: |
top |
top | ๐ฌ๐ณ | :guinea: |
๐ฌ๐ต | :guadeloupe: |
top |
top | ๐ฌ๐ถ | :equatorial_guinea: |
๐ฌ๐ท | :greece: |
top |
top | ๐ฌ๐ธ | :south_georgia_south_sandwich_islands: |
๐ฌ๐น | :guatemala: |
top |
top | ๐ฌ๐บ | :guam: |
๐ฌ๐ผ | :guinea_bissau: |
top |
top | ๐ฌ๐พ | :guyana: |
๐ญ๐ฐ | :hong_kong: |
top |
top | ๐ญ๐ฒ | :heard_mcdonald_islands: |
๐ญ๐ณ | :honduras: |
top |
top | ๐ญ๐ท | :croatia: |
๐ญ๐น | :haiti: |
top |
top | ๐ญ๐บ | :hungary: |
๐ฎ๐จ | :canary_islands: |
top |
top | ๐ฎ๐ฉ | :indonesia: |
๐ฎ๐ช | :ireland: |
top |
top | ๐ฎ๐ฑ | :israel: |
๐ฎ๐ฒ | :isle_of_man: |
top |
top | ๐ฎ๐ณ | :india: |
๐ฎ๐ด | :british_indian_ocean_territory: |
top |
top | ๐ฎ๐ถ | :iraq: |
๐ฎ๐ท | :iran: |
top |
top | ๐ฎ๐ธ | :iceland: |
๐ฎ๐น | :it: |
top |
top | ๐ฏ๐ช | :jersey: |
๐ฏ๐ฒ | :jamaica: |
top |
top | ๐ฏ๐ด | :jordan: |
๐ฏ๐ต | :jp: |
top |
top | ๐ฐ๐ช | :kenya: |
๐ฐ๐ฌ | :kyrgyzstan: |
top |
top | ๐ฐ๐ญ | :cambodia: |
๐ฐ๐ฎ | :kiribati: |
top |
top | ๐ฐ๐ฒ | :comoros: |
๐ฐ๐ณ | :st_kitts_nevis: |
top |
top | ๐ฐ๐ต | :north_korea: |
๐ฐ๐ท | :kr: |
top |
top | ๐ฐ๐ผ | :kuwait: |
๐ฐ๐พ | :cayman_islands: |
top |
top | ๐ฐ๐ฟ | :kazakhstan: |
๐ฑ๐ฆ | :laos: |
top |
top | ๐ฑ๐ง | :lebanon: |
๐ฑ๐จ | :st_lucia: |
top |
top | ๐ฑ๐ฎ | :liechtenstein: |
๐ฑ๐ฐ | :sri_lanka: |
top |
top | ๐ฑ๐ท | :liberia: |
๐ฑ๐ธ | :lesotho: |
top |
top | ๐ฑ๐น | :lithuania: |
๐ฑ๐บ | :luxembourg: |
top |
top | ๐ฑ๐ป | :latvia: |
๐ฑ๐พ | :libya: |
top |
top | ๐ฒ๐ฆ | :morocco: |
๐ฒ๐จ | :monaco: |
top |
top | ๐ฒ๐ฉ | :moldova: |
๐ฒ๐ช | :montenegro: |
top |
top | ๐ฒ๐ซ | :st_martin: |
๐ฒ๐ฌ | :madagascar: |
top |
top | ๐ฒ๐ญ | :marshall_islands: |
๐ฒ๐ฐ | :macedonia: |
top |
top | ๐ฒ๐ฑ | :mali: |
๐ฒ๐ฒ | :myanmar: |
top |
top | ๐ฒ๐ณ | :mongolia: |
๐ฒ๐ด | :macau: |
top |
top | ๐ฒ๐ต | :northern_mariana_islands: |
๐ฒ๐ถ | :martinique: |
top |
top | ๐ฒ๐ท | :mauritania: |
๐ฒ๐ธ | :montserrat: |
top |
top | ๐ฒ๐น | :malta: |
๐ฒ๐บ | :mauritius: |
top |
top | ๐ฒ๐ป | :maldives: |
๐ฒ๐ผ | :malawi: |
top |
top | ๐ฒ๐ฝ | :mexico: |
๐ฒ๐พ | :malaysia: |
top |
top | ๐ฒ๐ฟ | :mozambique: |
๐ณ๐ฆ | :namibia: |
top |
top | ๐ณ๐จ | :new_caledonia: |
๐ณ๐ช | :niger: |
top |
top | ๐ณ๐ซ | :norfolk_island: |
๐ณ๐ฌ | :nigeria: |
top |
top | ๐ณ๐ฎ | :nicaragua: |
๐ณ๐ฑ | :netherlands: |
top |
top | ๐ณ๐ด | :norway: |
๐ณ๐ต | :nepal: |
top |
top | ๐ณ๐ท | :nauru: |
๐ณ๐บ | :niue: |
top |
top | ๐ณ๐ฟ | :new_zealand: |
๐ด๐ฒ | :oman: |
top |
top | ๐ต๐ฆ | :panama: |
๐ต๐ช | :peru: |
top |
top | ๐ต๐ซ | :french_polynesia: |
๐ต๐ฌ | :papua_new_guinea: |
top |
top | ๐ต๐ญ | :philippines: |
๐ต๐ฐ | :pakistan: |
top |
top | ๐ต๐ฑ | :poland: |
๐ต๐ฒ | :st_pierre_miquelon: |
top |
top | ๐ต๐ณ | :pitcairn_islands: |
๐ต๐ท | :puerto_rico: |
top |
top | ๐ต๐ธ | :palestinian_territories: |
๐ต๐น | :portugal: |
top |
top | ๐ต๐ผ | :palau: |
๐ต๐พ | :paraguay: |
top |
top | ๐ถ๐ฆ | :qatar: |
๐ท๐ช | :reunion: |
top |
top | ๐ท๐ด | :romania: |
๐ท๐ธ | :serbia: |
top |
top | ๐ท๐บ | :ru: |
๐ท๐ผ | :rwanda: |
top |
top | ๐ธ๐ฆ | :saudi_arabia: |
๐ธ๐ง | :solomon_islands: |
top |
top | ๐ธ๐จ | :seychelles: |
๐ธ๐ฉ | :sudan: |
top |
top | ๐ธ๐ช | :sweden: |
๐ธ๐ฌ | :singapore: |
top |
top | ๐ธ๐ญ | :st_helena: |
๐ธ๐ฎ | :slovenia: |
top |
top | ๐ธ๐ฏ | :svalbard_jan_mayen: |
๐ธ๐ฐ | :slovakia: |
top |
top | ๐ธ๐ฑ | :sierra_leone: |
๐ธ๐ฒ | :san_marino: |
top |
top | ๐ธ๐ณ | :senegal: |
๐ธ๐ด | :somalia: |
top |
top | ๐ธ๐ท | :suriname: |
๐ธ๐ธ | :south_sudan: |
top |
top | ๐ธ๐น | :sao_tome_principe: |
๐ธ๐ป | :el_salvador: |
top |
top | ๐ธ๐ฝ | :sint_maarten: |
๐ธ๐พ | :syria: |
top |
top | ๐ธ๐ฟ | :swaziland: |
๐น๐ฆ | :tristan_da_cunha: |
top |
top | ๐น๐จ | :turks_caicos_islands: |
๐น๐ฉ | :chad: |
top |
top | ๐น๐ซ | :french_southern_territories: |
๐น๐ฌ | :togo: |
top |
top | ๐น๐ญ | :thailand: |
๐น๐ฏ | :tajikistan: |
top |
top | ๐น๐ฐ | :tokelau: |
๐น๐ฑ | :timor_leste: |
top |
top | ๐น๐ฒ | :turkmenistan: |
๐น๐ณ | :tunisia: |
top |
top | ๐น๐ด | :tonga: |
๐น๐ท | :tr: |
top |
top | ๐น๐น | :trinidad_tobago: |
๐น๐ป | :tuvalu: |
top |
top | ๐น๐ผ | :taiwan: |
๐น๐ฟ | :tanzania: |
top |
top | ๐บ๐ฆ | :ukraine: |
๐บ๐ฌ | :uganda: |
top |
top | ๐บ๐ฒ | :us_outlying_islands: |
๐บ๐ณ | :united_nations: |
top |
top | ๐บ๐ธ | :us: |
๐บ๐พ | :uruguay: |
top |
top | ๐บ๐ฟ | :uzbekistan: |
๐ป๐ฆ | :vatican_city: |
top |
top | ๐ป๐จ | :st_vincent_grenadines: |
๐ป๐ช | :venezuela: |
top |
top | ๐ป๐ฌ | :british_virgin_islands: |
๐ป๐ฎ | :us_virgin_islands: |
top |
top | ๐ป๐ณ | :vietnam: |
๐ป๐บ | :vanuatu: |
top |
top | ๐ผ๐ซ | :wallis_futuna: |
๐ผ๐ธ | :samoa: |
top |
top | ๐ฝ๐ฐ | :kosovo: |
๐พ๐ช | :yemen: |
top |
top | ๐พ๐น | :mayotte: |
๐ฟ๐ฆ | :south_africa: |
top |
top | ๐ฟ๐ฒ | :zambia: |
๐ฟ๐ผ | :zimbabwe: |
top |
Copyright ยฉ Shani Bider, 2024
This project is licensed under the MIT License.