-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotfix: demo preparation #106
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,5 @@ const postSchema = new Schema<IPost>( | |
export type PostDocument = HydratedDocument<IPost>; | ||
|
||
// Forum can be used to create new documents with the postSchema | ||
const PostModel = | ||
mongoose.models.Post || mongoose.model<IPost>('Post', postSchema); | ||
const PostModel = mongoose.model<IPost>('Post', postSchema); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure I need these in for |
||
export default PostModel; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,8 @@ import { logger } from './lib/middleware.lib'; | |
const app = createApp(); | ||
const PORT = config.get('port'); | ||
|
||
const connectFn = config.get('environment') == 'testing' ? resolve : connect; | ||
// Connect to MongoDB database | ||
connectFn().then( | ||
connect().then( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is causing "TypeError: Cannot read properties of undefined (reading 'then')" for |
||
() => { | ||
if (require.main === module) { | ||
app.listen(PORT, function () { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I really should have done this instead of a resolve hack lol