Database
by Tomas Trescak· Infrastructure

Root Folder
Not Attempted
NameProgress
Introduction
Not Read
🍰 Player
Not Read
Setup
Not Attempted
NameProgress
Software Installation
Not Read
Project Setup
Not Read
Running and Testing
Not Read
React and ReactDOM
Not Read
💡 Assignment 1: Welcome Message
Not Attempted
Submissions
Not Read
React
Not Attempted
NameProgress
JSX and Components
Not Read
Props
Not Read
👾 Exercise: Props
Not Attempted
CSS Styles
Not Read
useState and Hooks
Not Read
👾 Exercise: useState
Not Attempted
Conditional Rendering
Not Read
Lists
Not Read
👾 Exercise: Lists
Not Attempted
Forms and Events
Not Read
👾 Exercise: Forms
Not Attempted
💡 Assignment 2: Front End
Not Attempted
Advanced React
Not Attempted
NameProgress
Pure Components - memo
Not Read
Lifecycle - useEffect
Not Read
Expensive? - useMemo
Not Read
DOM Interactions - useRef
Not Read
forwardRef
Not Read
useImperativeHandle
Not Read
👾 useImperativeHandle
Not Attempted
Context
Not Read
useCallback
Not Read
useId
Not Read
useReducer
Not Read
Database
NextAuth and Github Authentication
Prisma and ORM
Project Setup
Project Authentication
APIs
Not Attempted
NameProgress
APIs
Not Read
APIs - Slides
Not Attempted
Rest APIs
Not Read
Rest APIs - Express.js
Not Read
ReastAPIs - Next.js
Not Read
Securing APIs
Not Read
Securing APIs - NextAuth
Not Read
tRPC
Not Attempted
NameProgress
tRPC
Not Read
tRPC - Routers
Not Read
tRPC - Server Rendering
Not Read
tRPC - Client Rendering
Not Read
Persisting Data
Not Read
Assignment 3: APIs
Not Read
0 / 50 XP

We have done a huge amount of work, focusing on “front-end” functionality, which represents the visual aspects of your application that your “clients” interact with. Now, it is time to implement the back-end, which contains the application logic, stores the data, and takes care of all the bells and whistles that deliver value to your clients.

One of the most important values of a timekeeping application is the possibility to check on your tasks at any time from any place on earth and add or remove them when needed. But, if you restart your server, you will see that all your tasks have been lost 😡! This is because all your tasks are only stored only in the server memory. Even worse, if you deploy your application to “serverless” providers such as Vercel, your tasks will be immediately lost after each page refresh.

It's time to store our data in the database!

Database Setup

There are many options for databases, and it falls out of the scope of this tutorial to explain the differences. Instead, we recommend you the most accepted industry standard PostgreSQL. You have several options when it comes to using PostgreSQL

  • Running a local database
    • You can download and install PostgreSQL from this page, or
    • You can use Docker to create an isolated container that's easy to remove. In the previous assessment, you can find the start-database.sh file that you can run directly on Mac and Linux to start a new local database, and it also contains instructions on how to make it work on Windows.
  • Provision a remote database
    • There are dozens of providers that provision PostgreSQL databases for reasonable prices or free

We recommend you to either purchase or provision remote database as it saves you a lot of headache and systems resources. Remote databases are also often backed up and have close to 100% run time.

Vercel

  1. Create your account on Vercel
  2. Create a new Postgres database using these instructions and make sure you select “Sydney” as your target zone
  3. On the main Vercel page go to the “Storage > Postgres Database” and copy your connection string in the following format

    postgres://default:**@**:5432/verceldb?sslmode=require

Whichever option you chose to work with your database, before continuing, make sure you have your connection string ready!

Maggie

Discuss with Maggie
Use the power of generative AI to interact with course content

Discussion

0 comments
Loading editor ...
Remember to be polite and report any undesirable behaviour

Category

Empty

Labels

Discussion has no labels

1 participant

user avatar

Priority

Notifications

You're not receiving notifications from this thread.
Course Outline