const express = require('express'); const fs = require('fs'); const app = express(); const api = express.Router(); app.listen(3000, () => { console.log("Server is up and running"); }); app.get('/hydra', (req, res) => { fs.readFile('./workflow.json', (err, json) => { let obj = JSON.parse(json); //res.json(obj); res.send({ results: JSON.stringify(obj) }); }); });