Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
swap orm and ioc sections
Browse files Browse the repository at this point in the history
  • Loading branch information
mathysth committed Jan 28, 2024
1 parent ac94f86 commit 37ccdee
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ const schema = z.object({

This step ensures that all variables adhere to a defined schema, enhancing the reliability of your application.

## ORM

This project utilizes [Prisma](https://www.prisma.io/), an Object-Relational Mapping (ORM) tool, to interact with the database.

Running prisma :

> At the moment Prisma needs Node.js to be installed to run certain generation code. Make sure Node.js is installed in the environment where you're running bunx prisma commands.
```powershell
bunx prisma
```

There is a class in the application (`AppOrm`) that allows retrieving a Prisma instance within the application as follows:
```ts
constructor(
@inject(SERVICE_IDENTIFIER.Orm) private orm: AppOrm,
) { }
```
For more details, refer to the [Prisma Documentation](https://www.prisma.io/docs).

## IOC

This project utilizes [Inversify](https://inversify.io/), an inversion of control container
Expand Down Expand Up @@ -112,6 +92,27 @@ For more information about name binding, please refer to the [Wiki](https://gith

You can find all the information about [Inversify Wiki](https://github.com/inversify/InversifyJS/tree/master/wiki).


## ORM

This project utilizes [Prisma](https://www.prisma.io/), an Object-Relational Mapping (ORM) tool, to interact with the database.

Running prisma :

> At the moment Prisma needs Node.js to be installed to run certain generation code. Make sure Node.js is installed in the environment where you're running bunx prisma commands.
```powershell
bunx prisma
```

There is a class in the application (`AppOrm`) that allows retrieving a Prisma instance within the application as follows:
```ts
constructor(
@inject(SERVICE_IDENTIFIER.Orm) private orm: AppOrm,
) { }
```
For more details, refer to the [Prisma Documentation](https://www.prisma.io/docs).

## TESTS

This project has adopted Bun Test for running tests.
Expand Down

0 comments on commit 37ccdee

Please sign in to comment.