testeranto 0.79.66 → 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.
@@ -5,7 +5,8 @@ import path from "path";
5
5
  import fs from "fs";
6
6
  import { ganttSchema, kanbanSchema, userSchema, featuresSchema, RoomSchema, HuddleSchema, channelsFeature, chatCatMessageSchema, } from "./mongooseSchemas";
7
7
  console.log("hello TaskMan Backend", process.env);
8
- const port = process.env.HTTPS_PORT || "3000";
8
+ const port = process.env.PORT || "8080";
9
+ const mongoConnect = process.env.MONGO_CONNECTION || "mongodb://127.0.0.1:27017";
9
10
  function findTextFiles(dir, fileList = []) {
10
11
  const files = fs.readdirSync(dir);
11
12
  for (const file of files) {
@@ -49,11 +50,12 @@ export default (partialConfig) => {
49
50
  const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
50
51
  fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
51
52
  const app = express();
52
- new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`)
53
- .connect()
54
- .then(async (conn) => {
53
+ new MongoClient(mongoConnect).connect().then(async (conn) => {
55
54
  const db = conn.db("taskman");
56
- await mongoose.connect(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`);
55
+ await mongoose.connect(`${mongoConnect}/taskman`);
56
+ // await mongoose.connect(
57
+ // `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
58
+ // );
57
59
  const usersModel = mongoose.model("User", userSchema);
58
60
  const kanbanModel = mongoose.model("Kanban", kanbanSchema);
59
61
  const ganttModel = mongoose.model("Gantt", ganttSchema);