Simple Node.js application that expose a gRPC server with CRUD operations
- Start
MongoDBdocker compose up -d
- Install dependencies
npm i
- Start the server
npm start
- The output should be the following
> grpc-nodejs@1.0.0 start > node server.js mongodb-client >> connect >> Connection to mongodb://localhost:27017 mongodb-client >> connect >> Connection to DB started: blog Server running at address 127.0.0.1:50051
- The output should be the following
- Import the blogs.proto into your preferred
APIclient (Es.Postman) - Perform the available calls
ListBlogs- Empty body
CreateBlog- Body
{ "blog": { "author": "Gabriele", "title": "New Blog", "content": "Amazing content" } }
- Body
ReadBlog- Body
{ "author": "Stephane" }
- Body
UpdateBlog- Body
{ "blog": { "id": "68761a6d699c6455bed15758", "author": "James" } }
- Body
DeleteBlog- Body
{ "id": "68761a6d699c6455bed15758" }
- Body
ListBlogsStream- Empty body