-
Clone the repository and run
npm run i
oryarn add
-
Create
.env
file and pasteDATABASE_URL=<
your DB username
>
APP_PORT=<your port
>
AUTH_USERNAME=<your username
>
AUTH_PASSWORD=<your password
> -
Connect your database
postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=SCHEMA
Here's a short explanation of each component:- USER: The name of your database user
- PASSWORD: The password for your database user
- HOST: The name of your host name (for the local environment, it is localhost)
- PORT: The port where your database server is running (typically 5432 for PostgreSQL)
- DATABASE: The name of the database
- SCHEMA: The name of the schema inside the database
-
Migrate your data base using :
npx prisma migrate dev
-
Seed to your data base and Install prisma client using :
npm install @prisma/client
npx prisma db seed
-
Acces to endpoints using postman To access authentication :
- Open Postman and create a new request.
- Enter your server's URL.
- Under the "Authorization" tab, select "Basic Auth" from the Type dropdown.
- Enter the AUTH_USERNAME and AUTH_PASSWORD you specified in your .env file.
- Send the request.
- If the credentials are correct, Postman will show the server's response. Otherwise, it will show a 401 Unauthorized error.
-
Notifications
You must be signed in to change notification settings - Fork 0
palveeen22/Server-prisma
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published