Serve static .json file to Nodejs using expressjs and serve-static
1 answer
you don't need this service-static module because it's built into express:
create a shared folder and just add this line to your code after you instantiate express:
var path = require('path');
app.use(express.static(path.join(__dirname, 'public')));
This should transfer all your files including JSON files.
+1
source to share