-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathutil.ts
More file actions
21 lines (17 loc) · 533 Bytes
/
util.ts
File metadata and controls
21 lines (17 loc) · 533 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as mongodb from 'mongodb'
export const MONGODB_DATABASE = 'tutorial'
export const MONGODB_COLLECTION = 'users'
const MONGODB_HOST = process.env.MONGODB_HOST!
const MONGODB_USER = process.env.MONGODB_USERNAME
const MONGODB_PASS = process.env.MONGODB_PASSWORD
export const mongoClient = new mongodb.MongoClient(MONGODB_HOST, {
auth: {username: MONGODB_USER, password: MONGODB_PASS},
})
export interface User {
userId: string
fullName: string
email: string
avatar: string
registeredAt: Date
country: string
}