Created
April 26, 2017 16:15
-
-
Save catarak/6fb1c60352676dcb6140c23666da7c30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Partial Express.js API for accessing microservices from front end dashboard | |
// ... | |
app.get('/api/tmstocsv/info', (req, res) => { | |
seneca.act('role:tmstocsv,cmd:info').then((info) => { | |
res.json(info); | |
}); | |
}); | |
app.get('/api/tmstocsv/run', (req, res) => { | |
seneca.act('role:tmstocsv,cmd:run').then(() => { | |
res.json({success: true}); | |
}); | |
}); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment