aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authorcjd242018-03-04 18:15:30 +0000
committercjd242018-03-04 18:15:30 +0000
commit955da66072042089cf457ab6406bfd7c97c4286f (patch)
tree379e4c4ea0bc008b3004b87b75bba8fc0348b18d /src/index.ts
parentPlaying around trying to get a list of base tiles we may be interested in for... (diff)
parentImplement handling of unauthorised requests (diff)
downloadmedicine-955da66072042089cf457ab6406bfd7c97c4286f.tar.gz
medicine-955da66072042089cf457ab6406bfd7c97c4286f.zip

Merge branch ‘trh/payload-checker’ into cjd24/conversion

Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts
index 06989ef..c6adf32 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -6,6 +6,7 @@ import { default as app } from './app';
import { default as seq } from './db/orm';
console.log('end import');
+import { default as User } from './db/model/User';
import { default as UserGroup } from './db/model/UserGroup';
const DEFAULT_PORT: number = 3000;
@@ -39,8 +40,17 @@ const port: number = process.env.PORT
description: 'Systems admin'
});
- // tslint:disable:no-floating-promises
- admin.save();
+ await admin.save();
+
+ console.log(admin.id);
+
+ const root: User = new User({
+ username: 'hafeez',
+ password: 'pass',
+ userGroup: admin
+ });
+
+ root.save();
console.log('Booting ExpressJS server');