![]() This will give view access to the user’s name as well. Since the user has a property for its workout logs, you can pass the user as the model and parse the logs on the pug view you will create. Then you can extract the username from the request and look up the user in the database using the Prisma client. First, you are using the ensureLoggedIn middleware to protect the route. # See the documentation for all the connection string options: DATABASE_URL = "file./dev.db" SEED_USER_NAME =) module. # See the documentation for more detail: # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB (Preview). # Environment variables declared in this file are automatically made available to Prisma. Start with Prisma and run the following command. You will configure them for usage later on. This is a dev dependency because the Prisma library handles the migrations, seed data, etc., while the package is used in your application at runtime.Īt this point, you will initialize Tailwind CSS and Prisma. This is because Tailwind will dynamically build your CSS files from your views and configuration. If you’ve never used Tailwind before, you may wonder why it’s a development dependency.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |