forked from 100xdevs-cohort-2/assignments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
harkirat singh
authored and
harkirat singh
committed
Feb 5, 2024
1 parent
05eff6f
commit 2807e70
Showing
16 changed files
with
7,040 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
# Keep environment variables out of version control | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Prisma Assignment | ||
Same as the last assignment, but you need to use `prisma` as the ORM. | ||
|
||
## Pre-requisites | ||
1. Checkout `prisma/schema.prisma` and see the initial schema that has been created. | ||
2. Replace `db.url` with your database URL. | ||
3. Run the following commands to migrate your database - | ||
```js | ||
npx prisma migrate dev | ||
npx prisma generate | ||
``` | ||
|
||
## Assignment | ||
You need to fill the db/user.ts and db/todos.ts using the `prisma` client to put in the data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// jest.config.js | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
// Optionally, set up paths to match your project structure | ||
roots: ['<rootDir>/src'], | ||
// Transform settings if you have custom needs, but this is optional since ts-jest is preset | ||
transform: { | ||
'^.+\\.ts$': 'ts-jest', | ||
}, | ||
// Module file extensions for importing | ||
moduleFileExtensions: ['ts', 'js', 'json', 'node'], | ||
}; | ||
|
Oops, something went wrong.