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 103ea82..0000000 Binary files a/db.sqlite and /dev/null differ 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 @@