testeranto 0.79.67 → 0.79.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,6 +60,7 @@ var RoomSchema = new mongoose.Schema({
60
60
  // src/TaskManBackEnd.ts
61
61
  console.log("hello TaskMan Backend", process.env);
62
62
  var port = process.env.PORT || "8080";
63
+ var mongoConnect = process.env.MONGO_CONNECTION || "mongodb://127.0.0.1:27017";
63
64
  function findTextFiles(dir, fileList = []) {
64
65
  const files = fs.readdirSync(dir);
65
66
  for (const file of files) {
@@ -107,19 +108,14 @@ var TaskManBackEnd_default = (partialConfig) => {
107
108
  JSON.stringify(config, null, 2)
108
109
  );
109
110
  const app = express();
110
- new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`).connect().then(async (conn) => {
111
+ new MongoClient(mongoConnect).connect().then(async (conn) => {
111
112
  const db = conn.db("taskman");
112
- await mongoose2.connect(
113
- `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
114
- );
113
+ await mongoose2.connect(`${mongoConnect}/taskman`);
115
114
  const usersModel = mongoose2.model("User", userSchema);
116
115
  const kanbanModel = mongoose2.model("Kanban", kanbanSchema);
117
116
  const ganttModel = mongoose2.model("Gantt", ganttSchema);
118
117
  const featuresModel = mongoose2.model("Features", featuresSchema);
119
- const MessagesModel = mongoose2.model(
120
- "Messages",
121
- chatCatMessageSchema
122
- );
118
+ const MessagesModel = mongoose2.model("Messages", chatCatMessageSchema);
123
119
  const ChatChannel = mongoose2.model("ChatChannel", channelsFeature);
124
120
  const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
125
121
  const roomsModel = ChatChannel.discriminator("Room", RoomSchema);