Thanks for boilerplate. It's very helpful.
It's my first real project with express and mongoose, and I'm sorry if my question is stupid.
I'm working on dictionary, and have an Article model:
const articleSchema = new Schema({
wordTable: { type: String, required: true },
wordForms: { type: [String] }
})
I need new route /search/:text
This route not related to /article route, but method still related to article model:
Article.find({ wordForms: text })
I'm a little confused, where to place this code.
Can you give me an advice please?