summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
diff options
context:
space:
mode:
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