Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김서영
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김서영
2019-11-22 21:36:43 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dc4c47602b8d61f1a7ff64baf22f5b8759de1443
dc4c4760
1 parent
587821c5
add cliConnection.js/ request client data and send analyzeData
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
api/cliConnection.js
api/cliConnection.js
0 → 100644
View file @
dc4c476
const
textAnalytic
=
require
(
"./textAnalystic"
);
const
search
=
require
(
"./search"
);
const
machineRead
=
require
(
"./machineRead"
);
/**
* @param req - request
* @param req.body.data - client에서 보내는 데이터 req.body.data.text에 검색할 문장을 담아야 합니다
* @description client와 데이터를 받아 통신하는 함수입니다
*/
const
cliConnection
=
async
(
req
,
res
)
=>
{
let
clientData
=
{},
analyzeData
=
{},
clientData
=
req
.
body
.
data
;
//clientData = req.body.data;
analyzeData
=
await
textAnalytic
(
clientData
);
analyzeData
.
searchResults
=
searchData
;
res
.
send
({
return_code
:
0
,
return_data
:
analyzeData
});
res
.
status
(
200
);
};
module
.
exports
=
cliConnection
;
Please
register
or
login
to post a comment