Reader small image

You're reading from  Full Stack Web Development with Remix

Product typeBook
Published inNov 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781801075299
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Andre Landgraf
Andre Landgraf
author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf

Right arrow

Fetching data

Before diving into this chapter, make sure you've followed the steps in the technical requirements section. Once you've completed the setup guide, let's briefly revisit the key steps to prevent any issues:

  1. Run npm i to install all dependencies.
  2. If you are missing a .env file in your project’s root, create a new .env file and add the following line to it:
    DATABASE_URL="file:./dev.db"

    Prisma – our database toolkit of choice – uses the DATABASE_URL environment variable to connect to our database.

  3. Next, run npm run build to generate the Prisma client for our data schema. Prisma reads our Prisma schema from the prisma/schema.prisma file and generates types and functions for us to work with.
  4. Run npm run update:db to create or update the SQLite database. We use SQLite with Prisma to persist our development data.
  5. Finally, run npm run seed to seed our local database with mock data. You can find the mock script...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Web Development with Remix
Published in: Nov 2023Publisher: PacktISBN-13: 9781801075299

Author (1)

author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf