Base des données avec nobejs #165342
Replies: 3 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Hi, thanks for the help
…________________________________
De : Liam ***@***.***>
Envoyé : mardi 8 juillet 2025 00:10
À : community/community ***@***.***>
Cc : MJM30 ***@***.***>; Mention ***@***.***>
Objet : Re: [community/community] Base des données avec nobejs (Discussion #165342)
Hi, @MJM30<https://github.com/MJM30>
To connect your web app to a database with Node.js, you'll need a database driver or ORM that matches your database (e.g., mongoose for MongoDB, pg for PostgreSQL, or mysql2 for MySQL).
Example with MongoDB
Install the package:
npm install mongoose
Connect to the database:
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/mydb')
.then(() => console.log('Connected'))
.catch(err => console.error(err));
Once connected, you can query or write to the database from your routes or services.
💡 For best results, look up a guide or video based on your exact tech stack.
________________________________
—
Reply to this email directly, view it on GitHub<#165342 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BUKEDTP3JNTQXL3SX6CC7PL3HL443AVCNFSM6AAAAACA54WHZ6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNRYHEYTCNI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Hi @MJM30, thanks for participating! Unfortunately, we don’t currently have moderators for languages other than English. Until that changes, we need to ask that everyone use English here in the GitHub Community when posting to ensure discussions are adhering to our Code of Conduct. We’ll be locking this post for now, but please feel encouraged to create a new discussion in English if you still need support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Show & Tell
Body
comment connecter son application web avec sa base des données avec nobejs
Beta Was this translation helpful? Give feedback.
All reactions