From 79e6f852b3fc012d74721b365894fe26cf3bd2e1 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Fri, 20 Dec 2019 23:36:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=8B=F0=9F=9A=AA=20Checkpoint=20./serve?= =?UTF-8?q?r.js:7435365/193=20./package.json:7435365/3052=20./README.md:74?= =?UTF-8?q?35365/914?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 28 +-------- server.js => app.js | 7 +-- package.json | 15 +++-- shrinkwrap.yaml | 137 ++++++-------------------------------------- 4 files changed, 28 insertions(+), 159 deletions(-) rename server.js => app.js (94%) diff --git a/README.md b/README.md index cb1061b..571ef60 100644 --- a/README.md +++ b/README.md @@ -1,27 +1 @@ -Welcome to Glitch -================= - -Click `Show` in the header to see your app live. Updates to your code will instantly deploy and update live. - -**Glitch** is the friendly community where you'll build the app of your dreams. Glitch lets you instantly create, remix, edit, and host an app, bot or site, and you can invite collaborators or helpers to simultaneously edit code with you. - -Find out more [about Glitch](https://glitch.com/about). - - -Your Project ------------- - -On the front-end, -- edit `public/client.js`, `public/style.css` and `views/index.html` -- drag in `assets`, like images or music, to add them to your project - -On the back-end, -- your app starts at `server.js` -- add frameworks and packages in `package.json` -- safely store app secrets in `.env` (nobody can see this but you and people you invite) - - -Made by [Glitch](https://glitch.com/) -------------------- - -\ 悜o悜)惎 +README.md coming soon! \ No newline at end of file diff --git a/server.js b/app.js similarity index 94% rename from server.js rename to app.js index 07f94ec..4afa49a 100644 --- a/server.js +++ b/app.js @@ -82,10 +82,9 @@ app.get('/getdata', (req, res) => { // Handle requests to /cleanup by deleting any data older than 90 days from the datastore app.get('/cleanup', (req, res) => { - // SECURITY CHECK FOR THE CORRECT CRONJOB HEADER GOES HERE!! - if (!req.headers['cleanup-key'] || req.headers['cleanup-key'] != process.env.SECRET) { - return res.status(401).send('Authorization header not found').end(); - } + //if (!req.headers['cleanup-key'] || req.headers['cleanup-key'] != process.env.SECRET) { + // return res.status(401).send('Authorization header not found').end(); + //} var before = new Date(); before.setDate(before.getDate()-91); diff --git a/package.json b/package.json index a782485..086feff 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,17 @@ "//1": "describes your app and its dependencies", "//2": "https://docs.npmjs.com/files/package.json", "//3": "updating this file will download and update your packages", - "name": "hello-express", - "version": "0.0.1", - "description": "A simple Node app built on Express, instantly up and running.", - "main": "server.js", + "name": "jasonsplant", + "version": "1.0.0", + "description": "A Node app to collect moisture data from the plant I have on my desk in the office, and graph the results.", + "main": "app.js", "scripts": { - "start": "node server.js" + "start": "node app.js" }, "dependencies": { "express": "^4.16.4", - "sqlite3": "*", - "sequelize": "*", - "request": "^2.88.0" + "sqlite": "^3.0.3", + "sequelize": "^6.0.0" }, "engines": { "node": "10.x" diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml index c827eca..dfd2444 100644 --- a/shrinkwrap.yaml +++ b/shrinkwrap.yaml @@ -1,13 +1,7 @@ dependencies: express: 4.16.4 - request: 2.88.0 - sequelize: 5.21.3 - sqlite3: 4.1.1 + sqlite: 3.0.3 packages: - /@types/node/12.12.21: - dev: false - resolution: - integrity: sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA== /abbrev/1.1.1: dev: false resolution: @@ -42,10 +36,6 @@ packages: node: '>=4' resolution: integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - /any-promise/1.3.0: - dev: false - resolution: - integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8= /aproba/1.2.0: dev: false resolution: @@ -95,10 +85,6 @@ packages: dev: false resolution: integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - /bluebird/3.7.2: - dev: false - resolution: - integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== /body-parser/1.18.3: dependencies: bytes: 3.0.0 @@ -137,13 +123,6 @@ packages: dev: false resolution: integrity: sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== - /cls-bluebird/2.1.0: - dependencies: - is-bluebird: 1.0.2 - shimmer: 1.2.1 - dev: false - resolution: - integrity: sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= /code-point-at/1.1.0: dev: false engines: @@ -212,12 +191,6 @@ packages: dev: false resolution: integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - /debug/4.1.1: - dependencies: - ms: 2.1.2 - dev: false - resolution: - integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== /deep-extend/0.6.0: dev: false engines: @@ -251,10 +224,6 @@ packages: hasBin: true resolution: integrity: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - /dottie/2.0.2: - dev: false - resolution: - integrity: sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg== /ecc-jsbn/0.1.2: dependencies: jsbn: 0.1.1 @@ -486,12 +455,6 @@ packages: dev: false resolution: integrity: sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - /inflection/1.12.0: - dev: false - engines: - '0': node >= 0.4.0 - resolution: - integrity: sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= /inflight/1.0.6: dependencies: once: 1.4.0 @@ -517,12 +480,6 @@ packages: node: '>= 0.10' resolution: integrity: sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - /is-bluebird/1.0.2: - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= /is-fullwidth-code-point/1.0.0: dependencies: number-is-nan: 1.0.1 @@ -576,10 +533,6 @@ packages: '0': node >=0.6.0 resolution: integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - /lodash/4.17.15: - dev: false - resolution: - integrity: sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== /media-typer/0.3.0: dev: false engines: @@ -663,16 +616,6 @@ packages: hasBin: true resolution: integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - /moment-timezone/0.5.27: - dependencies: - moment: 2.24.0 - dev: false - resolution: - integrity: sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw== - /moment/2.24.0: - dev: false - resolution: - integrity: sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== /ms/2.0.0: dev: false resolution: @@ -920,12 +863,6 @@ packages: node: '>= 4' resolution: integrity: sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - /retry-as-promised/3.2.0: - dependencies: - any-promise: 1.3.0 - dev: false - resolution: - integrity: sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== /rimraf/2.7.1: dependencies: glob: 7.1.6 @@ -954,11 +891,6 @@ packages: hasBin: true resolution: integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - /semver/6.3.0: - dev: false - hasBin: true - resolution: - integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== /send/0.16.2: dependencies: debug: 2.6.9 @@ -979,34 +911,6 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - /sequelize-pool/2.3.0: - dev: false - engines: - node: '>= 6.0.0' - resolution: - integrity: sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== - /sequelize/5.21.3: - dependencies: - bluebird: 3.7.2 - cls-bluebird: 2.1.0 - debug: 4.1.1 - dottie: 2.0.2 - inflection: 1.12.0 - lodash: 4.17.15 - moment: 2.24.0 - moment-timezone: 0.5.27 - retry-as-promised: 3.2.0 - semver: 6.3.0 - sequelize-pool: 2.3.0 - toposort-class: 1.0.1 - uuid: 3.3.3 - validator: 10.11.0 - wkx: 0.4.8 - dev: false - engines: - node: '>=6.0.0' - resolution: - integrity: sha512-ptdeAxwTY0zbj7AK8m+SH3z52uHVrt/qmOTSIGo/kyfnSp3h5HeKlywkJf5GEk09kuRrPHfWARVSXH1W3IGU7g== /serve-static/1.13.2: dependencies: encodeurl: 1.0.2 @@ -1026,14 +930,25 @@ packages: dev: false resolution: integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - /shimmer/1.2.1: - dev: false - resolution: - integrity: sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== /signal-exit/3.0.2: dev: false resolution: integrity: sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + /sql-template-strings/2.2.2: + dev: false + engines: + node: '>=4.0.0' + optional: true + resolution: + integrity: sha1-PxFQiiWt384hejBCqdMAwxk7lv8= + /sqlite/3.0.3: + dependencies: + sqlite3: 4.1.1 + dev: false + optionalDependencies: + sql-template-strings: 2.2.2 + resolution: + integrity: sha512-DpofdtBibbiOObtdADGZYE6bvnLpjRG4ut/MDTDau2nK40htOLj1E0c55aOkvbnRVqQ0ZPtjj7PJuKKyS0Ypww== /sqlite3/4.1.1: dependencies: nan: 2.14.0 @@ -1133,10 +1048,6 @@ packages: node: '>=4.5' resolution: integrity: sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - /toposort-class/1.0.1: - dev: false - resolution: - integrity: sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= /tough-cookie/2.4.3: dependencies: psl: 1.6.0 @@ -1192,12 +1103,6 @@ packages: hasBin: true resolution: integrity: sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== - /validator/10.11.0: - dev: false - engines: - node: '>= 0.10' - resolution: - integrity: sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== /vary/1.1.2: dev: false engines: @@ -1220,12 +1125,6 @@ packages: dev: false resolution: integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - /wkx/0.4.8: - dependencies: - '@types/node': 12.12.21 - dev: false - resolution: - integrity: sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ== /wrappy/1.0.2: dev: false resolution: @@ -1239,6 +1138,4 @@ shrinkwrapMinorVersion: 9 shrinkwrapVersion: 3 specifiers: express: ^4.16.4 - request: ^2.88.0 - sequelize: '*' - sqlite3: '*' + sqlite: ^3.0.3