This project is a simple gRPC service implemented in Node.js. The service manages a list of products, allowing you to add, edit, delete, and retrieve products. The data is stored in an SQLite database.
- gRPC Service: Implements a gRPC service with methods for listing, adding, updating, and deleting products.
- SQLite Database: Uses SQLite for data storage.
- Node.js Server and Client: Includes both server and client implementations.
-
Clone the repository:
git clone https://github.com/rezamh67/grpc-product-service.git cd grpc-product-service
-
Install dependencies:
npm install
To start the gRPC server, run:
node server.js
The server will start on localhost:50051
.
To interact with the gRPC service, you can use the provided client. Run the client with:
node client.js
This will perform a series of operations such as adding, listing, updating, and deleting products.
- protos/: Contains the
.proto
file that defines the gRPC service and messages. - server.js: The Node.js server that implements the gRPC service.
- client.js: The Node.js client that interacts with the gRPC server.
- database.js: Sets up and manages the SQLite database.
- README.md: This file, explaining the project and how to run it.
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.
This project is open-source and available under the MIT License.