Skip to content

Commit eeb7486

Browse files
committed
instructions added
1 parent 62eca32 commit eeb7486

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

week-10/10.1-prisma/README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,46 @@ The application allows users to create and participate in surveys. Each survey c
4242
- Prisma: Next-generation Node.js and TypeScript ORM
4343
- Jest: JavaScript testing framework
4444

45+
## Getting Started
46+
47+
Please follow the standard instructions to initiate a node app
48+
49+
50+
- Clone the repo
51+
52+
53+
1.change your directory
54+
```
55+
cd survey-poll-app
56+
```
57+
2.initiate a node app
58+
59+
```
60+
npm init -y
61+
```
62+
```
63+
npm install express prisma @prisma/client
64+
```
65+
3. Create Prisma schema file
66+
67+
Create a schema.prisma file in the root of your project and paste the provided schema into it.
68+
69+
4. Configure Database Connection
70+
71+
In the schema.prisma file, update env("DATABASE_URL") with your actual PostgreSQL database connection URL.
72+
73+
5. Generate Prisma Client
74+
75+
```
76+
npx prisma generate
77+
```
78+
6. Create an Express App
79+
80+
7. Implement CRUD Operations
81+
82+
Start Coding!!!
83+
84+
4585
## Directory Structure
4686

4787
**NOTE:Please adhere to the below directory structure, follow the same naming convention for files and directories in your app(Inorder to run tests w/o any trouble)**
@@ -73,6 +113,13 @@ survey-poll-app/
73113

74114
## Prisma Schema for your Reference
75115

116+
**Note : Not mandatory to follow this. this is just for your reference**
117+
118+
Just try to follow this basic structure for creating a survey
119+
120+
![img](./basic-survey.png)
121+
122+
76123
```
77124
datasource db {
78125
provider = "postgresql"
@@ -107,9 +154,7 @@ model Option {
107154
108155
```
109156

110-
## Getting Started
111157

112-
Please follow the standard instructions to initiate a node app
113158

114159
## Testing
115160

week-10/10.1-prisma/basic-survey.png

35.6 KB
Loading

0 commit comments

Comments
 (0)