From f95fe42c7f011d6bd31dffd52a0d3136034b5b4e Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Wed, 29 Jul 2020 21:13:18 +0200 Subject: [PATCH] displaying stub info --- .gitignore | 1 + db.sqlite | Bin 28672 -> 0 bytes index.js | 22 +++++++++++++++++----- lib/api/index.js | 4 +++- log | 0 src/components/TableView.vue | 29 +++++++++++++++++++++++++++++ src/views/Home.vue | 15 +++++++++++++-- 7 files changed, 63 insertions(+), 8 deletions(-) delete mode 100644 db.sqlite delete mode 100644 log create mode 100644 src/components/TableView.vue diff --git a/.gitignore b/.gitignore index 11f5d71..b05eb96 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ pnpm-debug.log* *.njsproj *.sln *.sw? +*.sqlite diff --git a/db.sqlite b/db.sqlite deleted file mode 100644 index 103ea82a278472f02d5ea8c886a0a42641b8d924..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28672 zcmeHQe{3Abb>1U+#~%{!9G?|NmRJo%nG{VONr|K-S$6Crd88=ar@2A@~6~48X!Od%s~>5H?y;EzW3hu-f-We(sxX7kC8dsDNv8}Yu9L@kajyE znx>@yS>491Ty2WKH_Kp)|Ih7lc~`auOV?CQq@}w%bhj^}d)CC+_q5B-mYAip zP2bjT5Ny-nUW*pkK3v)Lz%8MAvE=#Qt8IJJc4{`PIlF1}7t)~+y)5Kssx1QY_l)(E^K6xKQ$ z!+qkF;1>6K&bT4>;tzUD;{0D5`;Hd-=h)xki+U*p6aoqXg@8gpA)pXY2q**;0tx|z zfI>ha@GFf#eQj+#gh~+O+M3$##!aOKEuq@M&7b)t8S?r6Wi593S9)_wIE8>hKp~(I zPzWdl6aoqXg@8gpA)pXY2q*-8F$8KuwOT_M*M{Wbzdm+3wm^o!B^qchQX^Q+BI zHCLN6&HI|0xBk=Chqsou9^d-*EiY~P+?MlO4sF@d^hVP+n;vVrzv-T)!KP~(Uu%4- zak=qq<4j{)!&?o1-|$SshZ~HBf%-S=p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_)eiFUe{^nfG=tiOEGm+M%G^@%iqbI>)CZE_VLa|9 zigVMb1Cup-OFujGdK<+$D3K^IFJ~L#iTz6bjC|1kHwSkfoW&z+zj6|_YxZhYvy^_d zDkd!+?PF(dQ04lCY0`cgH4mtGO1iGCbByLuScYn=5gOETRHHwAv-3T8jF0EK% zKlirXi>LRfEYfX9_zSAs!JdX6&OJ+Sz^xCOQ;@^MGIq3 zbo9L&mCPuIS_NdSPDs?CkKhRlDv3}k>aV;!Ir53NyP@FDpb#U?%sHuH$ly<@eAj-f x?JnFLi>{QmPVj8b69s{DatoakLp$$89T}!fofyM^^I*tALVxtae}3u9{|lJ(uq6Nh diff --git a/index.js b/index.js index f8878e8..36052d5 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,8 @@ const cookie_parser = require ('cookie-parser'); const db = require ('./lib/db'); const crypto = require ('@sapphirecode/crypto-helper'); const password_helper = require ('@sapphirecode/password-helper'); +const api = require ('./lib/api'); +const http_proxy = require ('express-http-proxy'); const salt = crypto.create_salt (); const hash = crypto.hash_sha512 ('asd', salt); @@ -24,9 +26,19 @@ const user = { const app = express (); app.use (cookie_parser ()); app.use (body_parser.json ()); - app.use (auth ((name) => { - if (name === 'timo') - return user; - return null; - })); + + /* + * app.use (auth ((name) => { + *if (name === 'timo') + * return user; + *return null; + *})); + */ + + app.use (api); + app.use (http_proxy ('localhost:8080')); + + app.listen (3000, () => { + console.log ('listening on 3000'); + }); }) (); diff --git a/lib/api/index.js b/lib/api/index.js index 6faf5bd..ff39ee9 100644 --- a/lib/api/index.js +++ b/lib/api/index.js @@ -3,4 +3,6 @@ const router = require ('express') .Router (); -router.get ('log', require ('./get-log')); +router.get ('/log', require ('./get-log')); + +module.exports = router; diff --git a/log b/log deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/TableView.vue b/src/components/TableView.vue new file mode 100644 index 0000000..1959fc6 --- /dev/null +++ b/src/components/TableView.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/views/Home.vue b/src/views/Home.vue index a860900..e6abc5d 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,8 +1,19 @@