testeranto 0.79.32 → 0.79.33

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.
@@ -97,30 +97,34 @@ function listToTree(fileList) {
97
97
  }
98
98
  return root.children;
99
99
  }
100
- new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`).connect().then(async (conn) => {
101
- const db = conn.db("taskman");
102
- await mongoose2.connect(
103
- `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
104
- );
105
- const usersModel = mongoose2.model("User", userSchema);
106
- const kanbanModel = mongoose2.model("Kanban", kanbanSchema);
107
- const ganttModel = mongoose2.model("Gantt", ganttSchema);
108
- const featuresModel = mongoose2.model("Features", featuresSchema);
109
- const MessagesModel = mongoose2.model("Messages", chatCatMessageSchema);
110
- const ChatChannel = mongoose2.model("ChatChannel", channelsFeature);
111
- const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
112
- const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
113
- app.get("/TaskManFrontend.js", (req, res) => {
114
- res.sendFile(`${process.cwd()}/TaskManFrontEnd.js`);
115
- });
116
- app.get("/TaskManFrontEnd.css", (req, res) => {
117
- res.sendFile(`${process.cwd()}/TaskManFrontEnd.css`);
118
- });
119
- app.get("/testeranto.json", (req, res) => {
120
- res.sendFile(`${process.cwd()}/docs/testeranto.json`);
121
- });
122
- app.get("/", (req, res) => {
123
- res.send(`<!DOCTYPE html>
100
+ var TaskManBackEnd_default = () => {
101
+ new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`).connect().then(async (conn) => {
102
+ const db = conn.db("taskman");
103
+ await mongoose2.connect(
104
+ `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
105
+ );
106
+ const usersModel = mongoose2.model("User", userSchema);
107
+ const kanbanModel = mongoose2.model("Kanban", kanbanSchema);
108
+ const ganttModel = mongoose2.model("Gantt", ganttSchema);
109
+ const featuresModel = mongoose2.model("Features", featuresSchema);
110
+ const MessagesModel = mongoose2.model(
111
+ "Messages",
112
+ chatCatMessageSchema
113
+ );
114
+ const ChatChannel = mongoose2.model("ChatChannel", channelsFeature);
115
+ const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
116
+ const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
117
+ app.get("/TaskManFrontend.js", (req, res) => {
118
+ res.sendFile(`${process.cwd()}/TaskManFrontEnd.js`);
119
+ });
120
+ app.get("/TaskManFrontEnd.css", (req, res) => {
121
+ res.sendFile(`${process.cwd()}/TaskManFrontEnd.css`);
122
+ });
123
+ app.get("/testeranto.json", (req, res) => {
124
+ res.sendFile(`${process.cwd()}/docs/testeranto.json`);
125
+ });
126
+ app.get("/", (req, res) => {
127
+ res.send(`<!DOCTYPE html>
124
128
  <html lang="en">
125
129
 
126
130
  <head>
@@ -138,43 +142,47 @@ new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`).conn
138
142
  <body><div id="root">react is loading</div></body>
139
143
 
140
144
  </html>`);
141
- });
142
- app.listen(port, () => {
143
- console.log(`Example app listening on port ${port}`);
144
- });
145
- const keyedModels = {
146
- users: usersModel,
147
- kanbans: kanbanModel,
148
- features: featuresModel,
149
- gantts: ganttModel,
150
- rooms: roomsModel,
151
- huddles: huddleModdle,
152
- messages: MessagesModel
153
- };
154
- Object.keys(keyedModels).forEach((key) => {
155
- app.get(`/${key}.json`, async (req, res) => {
156
- console.log("GET", key, keyedModels[key]);
157
- res.json(await keyedModels[key].find({}));
158
145
  });
159
- app.get(`/${key}/:id.json`, async (req, res) => {
160
- res.json(
161
- await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
162
- );
146
+ app.listen(port, () => {
147
+ console.log(`Example app listening on port ${port}`);
163
148
  });
164
- app.post(`/${key}/:id.json`, async (req, res) => {
165
- res.json(
166
- await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
167
- );
149
+ const keyedModels = {
150
+ users: usersModel,
151
+ kanbans: kanbanModel,
152
+ features: featuresModel,
153
+ gantts: ganttModel,
154
+ rooms: roomsModel,
155
+ huddles: huddleModdle,
156
+ messages: MessagesModel
157
+ };
158
+ Object.keys(keyedModels).forEach((key) => {
159
+ app.get(`/${key}.json`, async (req, res) => {
160
+ console.log("GET", key, keyedModels[key]);
161
+ res.json(await keyedModels[key].find({}));
162
+ });
163
+ app.get(`/${key}/:id.json`, async (req, res) => {
164
+ res.json(
165
+ await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
166
+ );
167
+ });
168
+ app.post(`/${key}/:id.json`, async (req, res) => {
169
+ res.json(
170
+ await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
171
+ );
172
+ });
173
+ app.post(`/${key}.json`, async (req, res) => {
174
+ res.json(
175
+ await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
176
+ );
177
+ });
168
178
  });
169
- app.post(`/${key}.json`, async (req, res) => {
170
- res.json(
171
- await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
172
- );
179
+ app.use("/docs", express.static(path.join(process.cwd(), "docs")));
180
+ app.get("/docGal/fs.json", (req, res) => {
181
+ const directoryPath = "./";
182
+ res.json(listToTree(findTextFiles(directoryPath)));
173
183
  });
174
184
  });
175
- app.use("/docs", express.static(path.join(process.cwd(), "docs")));
176
- app.get("/docGal/fs.json", (req, res) => {
177
- const directoryPath = "./";
178
- res.json(listToTree(findTextFiles(directoryPath)));
179
- });
180
- });
185
+ };
186
+ export {
187
+ TaskManBackEnd_default as default
188
+ };
@@ -1 +1,2 @@
1
- export {};
1
+ declare const _default: () => void;
2
+ export default _default;