- NodeJs - as server side application representing APIs.
- Express - used as a framework on node to enable creating routes and APIs in an easy way.
- Api ai - as Dialogflow SDK , plugin allows integrating agents from the dialogflow natural language processing service with Node.js application.
- Helmet - helpers for more secure in Express application.
- Uuid - universally unique identifier - for dialogflow client sessions.
- REST API is a software architectural style that defines a set of constraints to be used for creating Web services
- The MVC Design Pattern is one of the oldest architectural pattern for web applications.
- you have to install NodeJS as it's the service and also to use its package manager npm.
- clone or download this project.
- open CMD or Terminal in this folder.
- write this command
npm install
or justnpm i
to install dependencies. - then add your data in the '.env' file .
- now write
npm run start
in the terminal to run the api and can test with postman or integrate with any front-end framework/library/template engine.
Here we have two routes ;
/
: it's aGET
request , just for say hello to the users ../client
: it's aPOST
request , sould be put the client message inmsg variable
or change the name of variable insrc/controllers/chatbot.js - ligne 51
then received the chatbot answer after few milliseconds ..
- convert this project to node package ( cli pakcage can generate this code ) ..
- create frontend projects for this api ..