1.0.0 • Published 3 years ago
profanity-ts-proto v1.0.0
Simple Server using Profanity GRPC API
Overview
This project uses @grpc/grpc-js module for building Profanity GRPC Client Stub We use the approach of using generated static compiled code from protos. It is present at src/proto/generated and also copied over under dist/proto/generated with this script "prestart": "npm run build && cp -r src/proto/generated/* dist/proto/generated/"
Run on local
cd into project root
npm install
npm run start
Try api with curl
curl -X GET "http://localhost:10080/checkShortText?text=shit" | jq
Response:
{
"status": "OK",
"hasProfanity": true,
"originalText": "shit",
"filteredText": "****"
}
1.0.0
3 years ago