Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

beclab/notifications

Repository files navigation

This is an official Terminus OS Notifications System.

Using this example

Run the following command:

npx create-turbo@latest -e with-prisma

What's inside?

This turborepo includes the following packages/apps:

Apps and Packages

  • web: aNext.js app
  • config:eslint configurations (includeseslint-config-next andeslint-config-prettier)
  • database:Prisma ORM wrapper to manage & access your database
  • tsconfig:tsconfig.jsons used throughout the monorepo

Each package/app is 100%TypeScript.

Utilities

This turborepo has some additional tools already setup for you:

Database

We usePrisma to manage & access our database. As such you will need a database for this project, either locally or hosted in the cloud.

To make this process easier, we offer adocker-compose.yml file to deploy a MySQL server locally with a new database namedturborepo (To change this update theMYSQL_DATABASE environment variable in thedocker-compose.yml file):

cd my-turborepodocker-compose up -d

Once deployed you will need to copy the.env.example file to.env in order for Prisma to have aDATABASE_URL environment variable to access.

cp .env.example .env

If you added a custom database name, or use a cloud based database, you will need to update theDATABASE_URL in your.env accordingly.

Once deployed & up & running, you will need to create & deploy migrations to your database to add the necessary tables. This can be done usingPrisma Migrate:

npx prisma migrate dev

If you need to push any existing migrations to the database, you can use either the Prisma db push or the Prisma migrate deploy command(s):

yarn run db:push# ORyarn run db:migrate:deploy

There is slight difference between the two commands &Prisma offers a breakdown on which command is best to use.

An optional additional step is to seed some initial or fake data to your database usingPrisma's seeding functionality.

To do this update check the seed script located inpackages/database/src/seed.ts & add or update any users you wish to seed to the database.

Once edited run the following command to run tell Prisma to run the seed script defined in the Prisma configuration:

yarn run db:seed

For further more information on migrations, seeding & more, we recommend reading through thePrisma Documentation.

Build

To build all apps and packages, run the following command:

yarn run build

Develop

To develop all apps and packages, run the following command:

yarn run dev

Useful Links

Learn more about the power of Turborepo:


[8]ページ先頭

©2009-2025 Movatter.jp