├── .gitignore ├── public ├── robots.txt ├── index.html └── maintenance.html ├── README.md ├── Gruntfile.js ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # powerline-server 2 | OAuth provider for Powerline.io, a list management client for Twitter. 3 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | grunt.initConfig({ 4 | bump: { 5 | options: { 6 | pushTo: 'origin', 7 | files: ['package.json'], 8 | commitFiles: ['package.json'] 9 | } 10 | } 11 | }); 12 | 13 | grunt.loadNpmTasks('grunt-bump'); 14 | 15 | }; -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var dotenv = require('dotenv'), 2 | oauthshim = require('oauth-shim'), 3 | express = require('express'); 4 | 5 | dotenv.load(); 6 | 7 | var PORT = process.env.PORT, 8 | NODE_ENV = process.env.NODE_ENV, 9 | CLIENT_ID = process.env.CLIENT_ID, 10 | CLIENT_SECRET = process.env.CLIENT_SECRET; 11 | 12 | var app = express(); 13 | app.use(express['static'](__dirname + '/public')); 14 | app.all('/oauthproxy', oauthshim.request); 15 | app.get('/', function (req, res) { 16 | res.render('index'); 17 | }); 18 | 19 | var config = {}; 20 | config[CLIENT_ID] = CLIENT_SECRET; 21 | oauthshim.init(config); 22 | 23 | if (NODE_ENV === 'development') { 24 | oauthshim.debug = true; 25 | } 26 | 27 | app.listen(PORT); 28 | console.log('Listening on port %d...', PORT); 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "powerline-server", 3 | "version": "0.0.2", 4 | "description": "OAuth provider for Powerline.io, a list management client for Twitter.", 5 | "main": "index.js", 6 | "engines": { 7 | "node": "0.10.x" 8 | }, 9 | "dependencies": { 10 | "dotenv": "^0.5.1", 11 | "express": "^4.12.2", 12 | "oauth-shim": "^0.2.1" 13 | }, 14 | "devDependencies": { 15 | "grunt": "^0.4.5", 16 | "grunt-bump": "^0.3.0" 17 | }, 18 | "scripts": { 19 | "start": "node index.js", 20 | "test": "echo \"Error: no test specified\" && exit 1" 21 | }, 22 | "repository": { 23 | "type": "git", 24 | "url": "https://github.com/donmccurdy/powerline-server.git" 25 | }, 26 | "author": "Don McCurdy", 27 | "license": "MIT", 28 | "bugs": { 29 | "url": "https://github.com/donmccurdy/powerline-server/issues" 30 | }, 31 | "homepage": "https://github.com/donmccurdy/powerline-server" 32 | } 33 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |Server is currently online.
45 |Powerline Server is currently offline. Please try again later.
45 |