mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
Feat/navigate (#81)
* feat/navigate upgrade react router * feat/navigate migrate to react router 6 * feat/navigate style modal * feat/navigate create endpoints for app settings * feat/navigate protect editor with pin * feat/navigate apply dynamic routing draft * feat/navigate upgrade relevant packages * feat/navigate restructure directory and add tests * feat/navigate test aliases validation * feat/navigate validate aliases before sending * feat/navigate create data endpoint * feat/navigate config: prettier * feat/navigate invalidate empty strings * feat/navigate create endpoints * feat/navigate parse on import * feat/navigate navigate to alias * feat/navigate user help and sample data * feat/navigate refact aliases modal * feat/navigate refact settings style * feat/navigate update sample db * feat/navigate link is relative to hostname * feat/navigate navigate to first match * feat/navigate update readme and version bump * feat/navigate config: create shared module * feat/navigate config: cheat module install * feat/navigate fix tests * feat/navigate run tests in pull request * Update ontime_cy.yml
This commit is contained in:
+9
-7
@@ -1,6 +1,7 @@
|
||||
// get environment vars
|
||||
import 'dotenv/config';
|
||||
import { sessionId, user } from './utils/analytics.js';
|
||||
|
||||
user.screenview('Node service', 'ontime').send();
|
||||
user.event('NODE', 'started', 'starting node service').send();
|
||||
|
||||
@@ -12,6 +13,7 @@ import { Low, JSONFile } from 'lowdb';
|
||||
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -26,7 +28,7 @@ import express from 'express';
|
||||
import http from 'http';
|
||||
import cors from 'cors';
|
||||
import { dbModelv1 as dbModel } from './models/dataModel.js';
|
||||
import { parseJsonv1 as parseJson, validateFile } from './utils/parser.js';
|
||||
import { parseJson_v1 as parseJson, validateFile } from './utils/parser.js';
|
||||
import ua from 'universal-analytics';
|
||||
|
||||
// validate JSON before attempting read
|
||||
@@ -86,8 +88,8 @@ app.use('/playback', playbackRouter);
|
||||
// serve react
|
||||
app.use(
|
||||
express.static(
|
||||
path.join(__dirname, env === 'prod' ? '../' : '../../', 'client/build')
|
||||
)
|
||||
path.join(__dirname, env === 'prod' ? '../' : '../../', 'client/build'),
|
||||
),
|
||||
);
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
@@ -97,8 +99,8 @@ app.get('*', (req, res) => {
|
||||
env === 'prod' ? '../' : '../../',
|
||||
'client',
|
||||
'build',
|
||||
'index.html'
|
||||
)
|
||||
'index.html',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -159,8 +161,8 @@ export const startServer = async (overrideConfig = null) => {
|
||||
// OSC Config
|
||||
const oscConfig = {
|
||||
ip: oscIP,
|
||||
port: overrideConfig?.port || oscOutPort
|
||||
}
|
||||
port: overrideConfig?.port || oscOutPort,
|
||||
};
|
||||
|
||||
// init timer
|
||||
global.timer = new EventTimer(server, config.timer, oscConfig, data.http);
|
||||
|
||||
Reference in New Issue
Block a user