diff options
| author | cjd24 | 2018-03-04 18:15:30 +0000 |
|---|---|---|
| committer | cjd24 | 2018-03-04 18:15:30 +0000 |
| commit | 955da66072042089cf457ab6406bfd7c97c4286f (patch) | |
| tree | 379e4c4ea0bc008b3004b87b75bba8fc0348b18d /src/index.ts | |
| parent | Playing around trying to get a list of base tiles we may be interested in for... (diff) | |
| parent | Implement handling of unauthorised requests (diff) | |
| download | medicine-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.ts | 14 |
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'); |
