Skip to content

imran517/node-js-grpc-sqlite-api

Repository files navigation

node-js-grpc-sqlite-api

A simple api using node.js/grpc and sqlite

Requirements

Diagram

Alt text

Components

  • Config (config.js)

    • configuration file
  • Server (server.js)

    • creates grpc server and listens on a port 3000
    • loads proto file, defines resolver (taskResolver.js)
  • Service (taskService.js)

    • handles business logic
  • Schema (task.proto)

    • defines schema for Task Entities and Service
  • dbContext (dbContext.js)

    • handles db connection
  • database (sqlite)

    • sqlite database

Run

Run the following command from the root directory:

node .\server.js

Tests

Try the following in Postman.

Setup:

  • New -> gRPC Request
  • Enter Server URL
  • Choose a way to load services..... (load proto file)
  • Select methods and set Request message if applicable
  • Invoke method

CRUD:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published