File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ import express from 'express' ;
2
+ import * as BM from 'biomechanics.js' ;
3
+
4
+ const router = express . Router ( ) ;
5
+ const bm = new BM . Biomechanics ( ) ;
6
+
7
+ router . post ( '/musculoskeletal-modeling' , async ( req , res ) => {
8
+ const { model } = req . body ;
9
+ const musculoskeletalModel = await bm . model ( model ) ;
10
+ res . json ( { musculoskeletalModel } ) ;
11
+ } ) ;
12
+
13
+ router . post ( '/movement-analysis' , async ( req , res ) => {
14
+ const { data } = req . body ;
15
+ const movementAnalysis = await bm . analyze ( data ) ;
16
+ res . json ( { movementAnalysis } ) ;
17
+ } ) ;
18
+
19
+ router . post ( '/prosthetic-design' , async ( req , res ) => {
20
+ const { design } = req . body ;
21
+ const prostheticDesign = await bm . design ( design ) ;
22
+ res . json ( { prostheticDesign } ) ;
23
+ } ) ;
24
+
25
+ export default router ;
You can’t perform that action at this time.
0 commit comments