Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강현태
/
capstone1-medical2
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
강현태
2018-06-06 22:34:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb1b23ac7589042a81b724841493eefac6ac31a8
eb1b23ac
1 parent
d69a1fb1
Add header
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
routes/index.js
routes/index.js
View file @
eb1b23a
...
...
@@ -28,11 +28,13 @@ router.post('/getPredict',function(req,res,next){
}
})
//csv포맷에 맞춰 출력
let
csv
=
normal_json
.
map
((
val
)
=>
val
.
value
).
join
(
','
);
let
csv1
=
normal_json
.
map
((
val
)
=>
val
.
name
).
join
(
','
);
let
csv2
=
normal_json
.
map
((
val
)
=>
val
.
value
).
join
(
','
);
csv
=
csv1
+
'\n'
+
csv2
;
fs
.
writeFileSync
(
'./inspection.csv'
,
csv
);
//스크립트 수행.
const
result
=
rscript
.
callSync
(
'
./test.R
'
,
{
path
:
process
.
cwd
()
+
'/inspection.csv'
});
const
result
=
rscript
.
callSync
(
'
/home/swc/capD/model/model.r
'
,
{
path
:
process
.
cwd
()
+
'/inspection.csv'
});
res
.
json
(
result
);
})
});
...
...
Please
register
or
login
to post a comment