Multi tenant application using Typescript, Express and MongoDB

Mutli tenant application structure.
public mongoUrl: string = 'mongodb://localhost/';mongoose.connect(this.mongoUrl, {   useNewUrlParser: true,});
public addNewStudent(req: Request, res: Response) {const collegeName = req.get('COLLEGE_NAME');const Student = StudentModel.createModel(collegeName, '2020');let newStudent = new Student(req.body);newStudent.save((err, student) => {if (err) {res.send(err);}res.json(student);});}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store