summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
diff options
context:
space:
mode:
authorJannik Schönartz2018-07-02 21:52:25 +0200
committerJannik Schönartz2018-07-02 21:52:25 +0200
commitaa4e552a03657a63922f5cd085431257c183f458 (patch)
treefc8cd63129bb54b06326c11847a9731fe70f1b33 /server/api/clients.js
downloadbas-aa4e552a03657a63922f5cd085431257c183f458.tar.gz
bas-aa4e552a03657a63922f5cd085431257c183f458.tar.xz
bas-aa4e552a03657a63922f5cd085431257c183f458.zip
[server] Initial commit to add the node server stuff.
Diffstat (limited to 'server/api/clients.js')
-rw-r--r--server/api/clients.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/api/clients.js b/server/api/clients.js
new file mode 100644
index 0000000..53aeb9d
--- /dev/null
+++ b/server/api/clients.js
@@ -0,0 +1,20 @@
+/* global __appdir */
+var path = require('path');
+var db = require(path.join(__appdir, 'lib', 'sequelize'));
+
+module.exports = {
+ get: function(req, res) {
+ //db.sequelize.authenticate()
+ //.then(() => { console.log('Connection has been established successfully.'); })
+ //.catch(err => { console.error('Unable to connect to the database:', err); });
+
+ //db.users2.create({ username: "wasd", password: "wasd", email: "w@a.de", name: "wa"});
+ db.users2.findOne({ where: { username: 'wasd' } }).then(user => {
+ console.log(user.get('username'));
+ });
+ res.end();
+ },
+ post: function(req, res) {
+
+ }
+} \ No newline at end of file