I have two separate files that need to use express.js to render html
- file1.js
- file1.js
file1.js has code:
var express = require('express');
var app = express();
app.get('/foo/bar1', (req, res) => res.json(['bar1'])
Can I do the same for file2.js, with a different endpoint?
var express = require('express');
var app = express();
app.get('/foo/bar2', (req, res) => res.json(['bar2'])
Or would this cause issues with express?