Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sagarmaheshwary/microservices-user-service
This service is a part of the Microservices project built for handling "user" related operations.
https://github.com/sagarmaheshwary/microservices-user-service
grpc microservice microservices nestjs postgres typeorm
Last synced: 5 days ago
JSON representation
This service is a part of the Microservices project built for handling "user" related operations.
- Host: GitHub
- URL: https://github.com/sagarmaheshwary/microservices-user-service
- Owner: SagarMaheshwary
- License: mit
- Created: 2024-03-20T14:55:03.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-01-11T07:30:12.000Z (7 days ago)
- Last Synced: 2025-01-11T08:26:48.882Z (7 days ago)
- Topics: grpc, microservice, microservices, nestjs, postgres, typeorm
- Language: TypeScript
- Homepage:
- Size: 781 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MICROSERVICES - USER SERVICE
This service is a part of the Microservices project built for handling "user" related operations.
### TECHNOLOGIES
- NestJS (9.0)
- gRPC
- PostgreSQL (14)
- TypeORM (0.3.20)### SETUP
cd into the cloned project directory and install dependencies:
```bash
npm install
```Copy **.env.example** to **.env** and update the required variables.
Create tables with TypeORM migrations: (migrations config is defined in **src/config/migrations.typeorm.ts**)
```bash
npm run migration:run
```Below command can be used to revert the migrations:
```bash
npm run migration:revert
```Create build:
```bash
npm run build
```Start the server for listening to incoming requests:
```bash
npm run start:prod
```Or run in development mode:
```bash
npm run start:dev
```### APIs (RPC)
Proto files are stored in **src/proto** directory.
| SERVICE | RPC | DESCRIPTION |
| ----------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| UserService | Store | Create user, used by [authentication service](https://github.com/SagarMaheshwary/microservices-authentication-service) for user registration |
| UserService | FindById | Find user by id, used by authentication service |
| UserService | FindByCredential | Find user by email and verify the given password, used by authentication service for user login |