These are chat archives for Automattic/mongoose

Apr 2017
Nukool Limrat
Apr 14 2017 04:20
can i use $gte $ne check String value
Apr 14 2017 06:37
@zhipengyue are you sure, database is connected ?
Dan Cancro
Apr 14 2017 19:12
I'm new to Mongoose. Does this schema definition look ok? When I do a patch request, all the documents are updated, not just the one for the given id. If I do a put request I get a 500 internal server error. The application uses Feathers and Mongoose. I want simple ids, not 24 character HexStrings.
import * as mongoose from 'mongoose'

const schema = new mongoose.Schema({
  _id: { type: String, required: true },
  text: { type: String, required: false },
  colour: { type: String, required: false },
  left: { type: String, required: false },
  top: { type: String, required: false },
  createdAt: { type: Date, 'default': },
  updatedAt: { type: Date, 'default': }

export default mongoose.model('Note', schema, 'note')
Dawid Kraus
Apr 14 2017 20:48
are you using HAML or Typescript?

// User Schema
var UserSchema = new Schema({
username: {
type: String,
password: {
type: String
email: {
type: String
name: {
first: String,
last: String

var User = module.exports = mongoose.model('User', UserSchema);

how do i read from the database and I inject it into my handlebars template?
I made a login and reg system and I want it so that your name appears on the top like "Hello Mohammed" also how to insert images
Like little avatars
Dan Cancro
Apr 14 2017 21:00
@terlord1 I'm using TypeScript
Dawid Kraus
Apr 14 2017 21:01