[REACT] MERN stack
Dear Bryntum,
I am trying to implement a mern stack and have a coupe of questions.
First, I can't figure out how the api is called when a sync request is made. I tried all methods like GET, POST and PUT, but my express server does not see any request coming in.
App config:
transport: {
load: {
url: 'https://localhost:5000/record/',
method: 'GET',
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
"credentials": "same-origin"
},
failure: (e) => {
console.log(e)
},
sync : {
url : 'https://localhost:5000/record/save'
}
}
},
autoLoad: true,
autoSync: true,
express node server:
recordRoutes.route("/record/save").post(function (req, res) {
let db_connect = dbo.getDb("bryntum");
db_connect.collection("records")
.findOne({},(function (err, result) {
if (err) throw err;
console.log(result);
}));
const myObj = {
success: true,
requestId: req.body.requestId,
revision: req.body.revision,
}
res.json(myObj);
});
My next question is if it is possible to have a Gantt without the Project flag at the start and at the end. Maybe I should switch to scheduler pro for this functionality. The Gantt resource-utilization demo has most of the functionality that we are looking for that is why I wanted to use that. Is it possible to add the tree like structure and add people to certain tasks in the scheduler pro utilization function? Basically to have all the functionality of Gantt resource-utilization demo but in the scheduler pro so that individual tasks do not need to be connected to each other or be part of a larger project.
If you have an example of a MERN stack that would be greatly appreciated as well.
Best regards and thank you,
Ömer