Databases

Step 3: To put a chat message in your database, find where you are storing the message on the server, and replace it with:
await db.collection(`messages`).insertOne(request.body)
The insertOne method could take some time to complete, so await is used, which means async must be placed on front of the function:
app.post(`/message`, async (request, response) => {
Last step Next step