Merge pull request #1 from Apple-Music-Electron/main

beginning migration to EJS for development of the app main page
This commit is contained in:
Brandon Plank 2021-12-06 20:15:31 -05:00 committed by GitHub
commit 357865709d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 787 additions and 3 deletions

View file

@ -113,9 +113,13 @@ const CiderBase = {
const webRemotePort = await getPort({port : 9000});
const webapp = express();
const webRemotePath = path.join(__dirname, '../cider-ui-tests/');
webapp.set("views", path.join(webRemotePath, "views"));
webapp.set("view engine", "ejs");
webapp.use(express.static(webRemotePath));
webapp.get('/', function (req, res) {
res.sendFile(path.join(webRemotePath, 'index.html'));
//res.sendFile(path.join(webRemotePath, 'index_old.html'));
res.render("main")
});
webapp.listen(webRemotePort, function () {
console.log(`Web Remote listening on port ${webRemotePort}`);