-
Clone the repository:
git clone https://github.com/FanFareBD/toxic-text-detection-micro-service
-
Go to the project directory
cd Toxic Text Detection Service -
Install dependencies
Make sure you have Node.js installed. Then run:
npm install
-
Environment Variables
Create a
.envfile in the root of the project and add necessary environment variables given below:PORT= MONGO_URI= TOXIC_TEXT_DETECTION_API="toxic-text-ai-model-url/predict" TOXIC_TEXT_PUBLICATION_API="ff-backend-url/toxic-text-detection/fanfare-backend-ttd-publication"
-
Build the development Server
npm run build
-
Start the development Server
npm run start
OR
-
Build and Start the Development Server Concurrently
npm run dev
You can see in server log
Toxic Text Detection Micro Service has started on port http://localhost:YOUR_PORT
GET /ttd-processor/start GET /ttd-processor/stop GET /ttd-publisher/start GET /ttd-publisher/stop