db.js 323 B

123456789101112131415
  1. const mongoose = require('mongoose');
  2. const memberSchema = mongoose.Schema({
  3. handle: String,
  4. tgId: Number,
  5. date: Date,
  6. lastCommand: String
  7. });
  8. mongoose.model('members', memberSchema);
  9. mongoose.connect('mongodb://127.0.0.1:27017/JoystreamLeaderboardBot', {
  10. useNewUrlParser: true,
  11. useUnifiedTopology: true
  12. });