-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4934248
commit 045ac6d
Showing
9 changed files
with
469 additions
and
1,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
const config = { | ||
export const Config = { | ||
uri: 'mongodb://mongo:27017/users' | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import mongoose from 'mongoose' | ||
import config from './config' | ||
import {Config} from './config.js' | ||
|
||
mongoose.connect(config.uri) | ||
mongoose.connect(Config.uri) | ||
|
||
const userSchema = { | ||
firstName: String, | ||
lastName: String, | ||
tags: Array | ||
} | ||
|
||
module.exports = mongoose.model('users', userSchema) | ||
export const Model = mongoose.model('users', userSchema) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.