diff --git a/src/handlers/countries.js b/src/handlers/countries.js new file mode 100644 index 0000000..e69de29 diff --git a/src/model/countries.js b/src/model/countries.js new file mode 100644 index 0000000..cc12682 --- /dev/null +++ b/src/model/countries.js @@ -0,0 +1,10 @@ +const db = require("../database/connection"); + +function getAllCountries() { + return db + .query("SELECT * FROM countries") + .then(result => result.rows) + .catch(error); +} + +module.exports = { getAllCountries };