From 5d7360bd2c2a2624f826bb0710e716f0e16e9741 Mon Sep 17 00:00:00 2001 From: jackchi Date: Sat, 9 Apr 2016 21:18:09 -0700 Subject: [PATCH] Fix Node.js Oauth2 client dependencies --- .gitignore | 6 ++++++ README.md | 9 ++++++++- package.json | 11 +++++++++++ stoauth.js | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..071d876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# NPM Dependency directory +node_modules + +# Developement related files +.DS_Store +.idea/ diff --git a/README.md b/README.md index 6038f75..9fb5c94 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ # SmartThings Various odds and ends interesting for SmartThings -* stoauth.js - example node.js oauth client for authenticating with a SmartApp REST endpoint +## Installation +npm install + +## Running + + `npm stoauth.js ` + + stoauth.js - example node.js oauth client for authenticating with a SmartApp REST endpoint diff --git a/package.json b/package.json new file mode 100644 index 0000000..ab8ceec --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "SmartThings", + "description": "Gets TokenId", + "main": "stoauth.js", + "dependencies": { + "express": "4.12.2", + "request": "2.55.0", + "JSON": "1.0.0", + "simple-oauth2" : "^0.6.0" + } +} diff --git a/stoauth.js b/stoauth.js index 5a56df2..e138151 100644 --- a/stoauth.js +++ b/stoauth.js @@ -5,6 +5,7 @@ npm install express npm install request npm install JSON + npm install simple-oauth2 */