Skip to content
Snippets Groups Projects
Commit 274e810f authored by Inès Yeterian's avatar Inès Yeterian
Browse files

talking to mongodb, god knows where this is leading us

parent 3fb33f03
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,10 @@ db.on("error", console.error.bind(console, "connection error:")); ...@@ -21,6 +21,10 @@ db.on("error", console.error.bind(console, "connection error:"));
db.once("open", function() { db.once("open", function() {
console.log("on est connecté!"); console.log("on est connecté!");
}); });
toucans.updateMany({}, {"$set":{"toucan_id": { "$concat": ["$title", "-", { $year: "$date" }]}}});
app.use(cors()); app.use(cors());
app.use(bodyParser.json()); app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.urlencoded({extended: true}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment