Skip to content
Snippets Groups Projects
Commit f32a2382 authored by Joonas Seppä's avatar Joonas Seppä
Browse files

Trying to get DB to work

parent 1d9cee64
Branches
Tags
No related merge requests found
Pipeline #61496 passed
......@@ -17,17 +17,12 @@ async function addMessage(messageContent){
messages = await Message.find()
console.log(messages);
(async () => {
await app.get("/", (req, res) => {
res.send(messages)
})
})()
await mongoose.disconnect()
}
app.get("/", (req, res) => {
res.send("Hello")
})
const port = process.env.PORT || 3000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment