How can I utilize express.js to render html in two separate files?
- file1.js
- file2.js
The code inside file1.js is as follows:
var express = require('express');
var app = express();
app.get('/foo/bar1', (req, res) => res.json(['bar1'])
Can I follow the same approach for file2.js but with a different endpoint?
var express = require('express');
var app = express();
app.get('/foo/bar2', (req, res) => res.json(['bar2'])
Will this setup pose any potential issues with express?