|
|
|
|
@ -23,12 +23,16 @@ const router = express.Router();
|
|
|
|
|
router.post("/getProjects", function (req, res, next) {
|
|
|
|
|
console.log("yes there is a request");
|
|
|
|
|
var io = req.app.get("io");
|
|
|
|
|
io.emit("world", "This will emit projects");
|
|
|
|
|
io.emit("test", "This will emit projects");
|
|
|
|
|
io.emit("test", "Hello from socket");
|
|
|
|
|
// io.to(//socket.id//).emit("message", data);
|
|
|
|
|
|
|
|
|
|
// db.rides.find(function(err, docs) {
|
|
|
|
|
// res.json(docs);
|
|
|
|
|
// });
|
|
|
|
|
res.setHeader("content-type", "text/html; charset=utf-8");
|
|
|
|
|
res.setHeader("Access-Control-Allow-Origin", "*");
|
|
|
|
|
res.send("ok you got it back");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get("/", function (req, res) {
|
|
|
|
|
|