Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate simple entity service to prisma #195

Merged

Conversation

RohanNankani
Copy link

Implementation description

Refactor CRUD operations to help migrate the simple entity service from Sequelize to Prisma ORM.

Steps to test

  1. From the CLI, run the command: "npm run dev -- --testing" and generate the PERN stack from the branch "rohan-sanskriti/migrate-entity-service"
  2. Build the application by running the command: "docker-compose up --build -d"
  3. From the Postman, under “Body” click raw and then “Json” and put your credentials:
    {
    “email”: “[email protected]”,
    “password”: “your-password”
    }
  4. Make a POST request to "http://localhost:8080/auth/login"
  5. You will get the user token after the request which you then put under “Authorization” of type “Bearer Token”
  6. Make the necessary GET, POST, and DELETE requests to "http://localhost:8080/entities" to create, update, and delete entities.

Note: if there are issues while testing from Postman, you can also go to localhost:3000 and create/update entities from there and access the PostgreSQL database to see whether the changes are reflected. You can do this by running the commands "docker exec -it scv2_db /bin/bash", then "psql -U postgres -d scv2", and then do "SELECT * FROM entities;" and you should see the entries.

@omeradeel26 omeradeel26 merged commit 549cf55 into prisma-migration Aug 8, 2024
@omeradeel26 omeradeel26 deleted the rohan-sanskriti/migrate-simple-entity branch August 8, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants