sergeKashkin / crud-tutorial

0 stars 1 forks source link

FEAT: BE - Wire up database #6

Open sergeKashkin opened 4 months ago

sergeKashkin commented 4 months ago

The purpose of this task is to connect our express backend to a database.

You have 2 options - SQLite or MongoDB Atlas. SQLite is lightweight, does not requiring a server and is basically a file based db. MongoDB Atlas is a powerful db in the cloud. It has free tier which you could use for this tutorial.

Check their docs and setup with express than decide which one you want to use. We can discuss pros and cons together.

Make sure to store the connection string under .env file. Use a package called dotenv in order to load Environment variables from .env.

After you have a setup of the db, we'll continue with business logic.