From: Ben Beltran Date: Mon, 28 Nov 2016 06:59:52 +0000 (-0600) Subject: LGTM-1 Create Initial Design X-Git-Tag: 1.0.0~2 X-Git-Url: https://git.r.bdr.sh/rbdr/lgtm/commitdiff_plain/927c9aae8b0e28b39f0ee913d9bf53a3c0687e43?hp=afe2612c99e19001753a87943a1f86519527e4e1 LGTM-1 Create Initial Design Squashed commit of the following: commit 322c92fdfbbef070b171b700d24c6733ac2e0ef9 Author: Ben Beltran Date: Mon Nov 28 00:57:58 2016 -0600 Serve the basic design commit 702077266d36d190a454a2665b7e31c8f64746ac Author: Ben Beltran Date: Mon Nov 28 00:05:03 2016 -0600 Add linter configs commit 4c4dc29c555d44629fae39e5ed8831e304af570a Author: Ben Beltran Date: Sun Nov 27 23:49:07 2016 -0600 Add package.json --- diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..9d8f6de --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "eslint-config-skycatch" +} diff --git a/config/config.js b/config/config.js new file mode 100644 index 0000000..3204568 --- /dev/null +++ b/config/config.js @@ -0,0 +1,10 @@ +'use strict'; + +const Getenv = require('getenv'); + +const internals = {}; + +module.exports = internals.Config = { + port: Getenv.int('LGTM_PORT', 1728), + staticDirectory: Getenv('LGTM_STATIC_DIRECTORY', 'static') +}; diff --git a/index.js b/index.js new file mode 100644 index 0000000..46d4049 --- /dev/null +++ b/index.js @@ -0,0 +1,29 @@ +'use strict'; + +const Config = require('./config/config'); +const Koa = require('koa'); +const KoaStatic = require('koa-static'); + +const internals = {}; + +internals.run = () => { + + internals.app = Koa(); + + internals.app.use(KoaStatic(Config.staticDirectory)); + + console.log(' .'); + console.log(' /'); + console.log(' +-----+'); + console.log(` | o o | - Listening Gladly, Try Me: ${Config.port}`); + console.log(' +-----+'); + console.log(' +---------+'); + console.log(' /| [][] |\\'); + console.log(' || | |'); + console.log(' || | \\c'); + console.log(' ^+---------+'); + console.log(' (.) '); + internals.app.listen(Config.port); +}; + +internals.run(); diff --git a/package.json b/package.json new file mode 100644 index 0000000..54cad7c --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "lgtm", + "version": "0.0.0", + "description": "looks good to me", + "main": "index.js", + "scripts": { + "lint": "eslint .", + "start": "node index", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/rbdr/lgtm.git" + }, + "author": "Ruben Beltran del Rio ", + "license": "MIT", + "bugs": { + "url": "https://github.com/rbdr/lgtm/issues" + }, + "homepage": "https://github.com/rbdr/lgtm#readme", + "dependencies": { + "getenv": "^0.7.0", + "koa": "^1.2.4", + "koa-static": "^2.0.0" + }, + "devDependencies": { + "eslint-config-hapi": "^10.0.0", + "eslint-plugin-hapi": "^4.0.0" + } +} diff --git a/static/css/app.css b/static/css/app.css new file mode 100644 index 0000000..ce1f73f --- /dev/null +++ b/static/css/app.css @@ -0,0 +1,18 @@ +* { + margin: 0; + padding: 0 +} + +#lgtm { + height: 100vh; + display: flex; + align-items: center; + justify-content: center; +} + +#lgtm p { + color: #3B3B3B; + font-family: Yrsa, serif; + font-size: 48px; + line-height: 0.96em; +} diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..cc5b8a2 --- /dev/null +++ b/static/index.html @@ -0,0 +1,23 @@ + + + + LGTM! 👍 + + + + + + +
+

+ Looks
+ Good
+ To
+ Me
+
+ 👍 +

+
+ + + diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..441620e --- /dev/null +++ b/yarn.lock @@ -0,0 +1,286 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +accepts@^1.2.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +any-promise@^1.0.0, any-promise@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + +co@^4.0.2, co@^4.4.0, co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +composition@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/composition/-/composition-2.3.0.tgz#742805374cab550c520a33662f5a732e0208d6f2" + dependencies: + any-promise "^1.1.0" + co "^4.0.2" + +content-disposition@~0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.1.tgz#87476c6a67c8daa87e32e87616df883ba7fb071b" + +content-type@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +cookies@~0.6.1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.6.2.tgz#6ac1b052895208e8fc4c4f5f86a9ed31b9cb5ccf" + dependencies: + depd "~1.1.0" + keygrip "~1.0.1" + +debug@*: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +deep-equal@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" + +destroy@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +error-inject@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37" + +escape-html@~1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +eslint-config-hapi@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-hapi/-/eslint-config-hapi-10.0.0.tgz#9980affd76103ebc1fec92b45638345db19348f5" + +eslint-plugin-hapi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-hapi/-/eslint-plugin-hapi-4.0.0.tgz#44aa2e45f7939a523929cd832bb9aa129a95e823" + dependencies: + hapi-capitalize-modules "1.x.x" + hapi-for-you "1.x.x" + hapi-scope-start "2.x.x" + no-arrowception "1.x.x" + +fresh@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" + +getenv@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/getenv/-/getenv-0.7.0.tgz#39b91838707e2086fd1cf6ef8777d1c93e14649e" + +hapi-capitalize-modules@1.x.x: + version "1.1.6" + resolved "https://registry.yarnpkg.com/hapi-capitalize-modules/-/hapi-capitalize-modules-1.1.6.tgz#7991171415e15e6aa3231e64dda73c8146665318" + +hapi-for-you@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hapi-for-you/-/hapi-for-you-1.0.0.tgz#d362fbee8d7bda9c2c7801e207e5a5cd1a0b6a7b" + +hapi-scope-start@2.x.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/hapi-scope-start/-/hapi-scope-start-2.1.1.tgz#7495a726fe72b7bca8de2cdcc1d87cd8ce6ab4f2" + +http-assert@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.2.0.tgz#d6392e6f6519def4e340266b35096db6d3feba00" + dependencies: + deep-equal "~1.0.0" + http-errors "~1.4.0" + +http-errors@^1.2.8, http-errors@~1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.5.1.tgz#788c0d2c1de2c81b9e6e8c01843b6b97eb920750" + dependencies: + inherits "2.0.3" + setprototypeof "1.0.2" + statuses ">= 1.3.1 < 2" + +http-errors@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.4.0.tgz#6c0242dea6b3df7afda153c71089b31c6e82aabf" + dependencies: + inherits "2.0.1" + statuses ">= 1.2.1 < 2" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +keygrip@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.1.tgz#b02fa4816eef21a8c4b35ca9e52921ffc89a30e9" + +koa-compose@^2.3.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-2.5.1.tgz#726cfb17694de5cb9fbf03c0adf172303f83f156" + +koa-is-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/koa-is-json/-/koa-is-json-1.0.0.tgz#273c07edcdcb8df6a2c1ab7d59ee76491451ec14" + +koa-send@~3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/koa-send/-/koa-send-3.1.1.tgz#ef0af0f9a531ec817e88056b52b8e32d2e0ba91a" + dependencies: + co "^4.6.0" + debug "*" + mz "^2.3.1" + resolve-path "^1.3.1" + +koa-static: + version "2.0.0" + resolved "https://registry.yarnpkg.com/koa-static/-/koa-static-2.0.0.tgz#2693482e1a4c0219e6d926be1703a2658b754f26" + dependencies: + debug "*" + koa-send "~3.1.0" + +koa@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/koa/-/koa-1.2.4.tgz#6ef6d17a7bea8ec778a8572b55a0d0562e488654" + dependencies: + accepts "^1.2.2" + co "^4.4.0" + composition "^2.1.1" + content-disposition "~0.5.0" + content-type "^1.0.0" + cookies "~0.6.1" + debug "*" + delegates "^1.0.0" + destroy "^1.0.3" + error-inject "~1.0.0" + escape-html "~1.0.1" + fresh "^0.3.0" + http-assert "^1.1.0" + http-errors "^1.2.8" + koa-compose "^2.3.0" + koa-is-json "^1.0.0" + mime-types "^2.0.7" + on-finished "^2.1.0" + only "0.0.2" + parseurl "^1.3.0" + statuses "^1.2.0" + type-is "^1.5.5" + vary "^1.0.0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.0.7, mime-types@~2.1.11, mime-types@~2.1.13: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +mz@^2.3.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce" + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +no-arrowception@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/no-arrowception/-/no-arrowception-1.0.0.tgz#5bf3e95eb9c41b57384a805333daa3b734ee327a" + +object-assign@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +on-finished@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +only@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" + +parseurl@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-is-absolute@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +resolve-path@^1.3.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.3.3.tgz#4d83aba6468c2b8e632a575e3f52b0fa0dbe1a5c" + dependencies: + http-errors "~1.5.0" + path-is-absolute "1.0.1" + +setprototypeof@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.2.tgz#81a552141ec104b88e89ce383103ad5c66564d08" + +statuses@^1.2.0, "statuses@>= 1.2.1 < 2", "statuses@>= 1.3.1 < 2": + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.2.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.2.1.tgz#251fd1c80aff6e5cf57cb179ab1fcb724269bd11" + dependencies: + any-promise "^1.0.0" + +type-is@^1.5.5: + version "1.6.14" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.13" + +vary@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.0.tgz#e1e5affbbd16ae768dd2674394b9ad3022653140" +