From 190403a2104490ac5e63a9bcf5d789a5c989d5f1 Mon Sep 17 00:00:00 2001 From: Edward Reyes Date: Thu, 3 Sep 2020 02:52:42 -0700 Subject: [PATCH] attemp at dotenv --- .gitignore | 3 +++ package.json | 23 +++++++++++++++++++++++ scripts/script.js | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7545483 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +package-lock.json +.env diff --git a/package.json b/package.json new file mode 100644 index 0000000..e2940e3 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "WeatherApp", + "version": "1.0.0", + "description": "## AUTHOR", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/edwardreyes29/WeatherApp.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/edwardreyes29/WeatherApp/issues" + }, + "homepage": "https://github.com/edwardreyes29/WeatherApp#readme", + "dependencies": { + "dotenv": "^8.2.0" + } +} diff --git a/scripts/script.js b/scripts/script.js index 7dd3b3a..6a1508c 100644 --- a/scripts/script.js +++ b/scripts/script.js @@ -123,7 +123,7 @@ $('#dismiss').on('click', function () { $('.overlay').removeClass('active'); }); /*######## Open Weather API ########*/ - +require('dotenv').config() /* Current weather data */ const OW_API_KEY = "de36e36780976652d3e84a5502633fce"; const NUMBER_OF_DAYS = 5;