i developed an app using reactjs and flux for front and express for the back as a server. everything worked fine. but when i hosted the app tehre is a problem. if more than one user is running the application via its url, the changes apply to all instances. doesn't express allow multi instances?
EDIT: Here is my getMail: it's a function in my server.js
app.get('/api/getmail', function(req, res) {
try {
let id = req.param('id');
var options = { sql: 'SELECT * FROM message WHERE message_owner="' + id + '"', nestTables: true };
connection.query(options, function(err, result) {
if (err) throw err;
res.json(result);
});
} catch (error) {
res.json({ error: error });
}
});
When the user hits (in the front) getMails, a request is sent with an api i made (the api uses request from superagent/lib/client). The port of my server is specified like so:
app.listen(3002);