Files
tunarr/server/src/api/v2/index.ts
Christian Benincasa 5570631adc Packaging v0: Build and run server in a docker container (#139)
* This is a nightmare

* Checkpointing.... getting closer

* First cut - packaging the server in a docker container

* Remove busted bundles

* Minify build

* Some common commands for building - we're going to look into proper monorepo solutions soon

* Remove dependency on serve-static

* Add web serving, full-stack docker target, and Nvidia container support

* Remove test action graph for now
2024-03-05 13:13:26 -05:00

30 lines
974 B
TypeScript

import createLogger from '../../logger.js';
import { RouterPluginAsyncCallback } from '../../types/serverType.js';
import { channelsApiV2 } from './channelsApiV2.js';
import { customShowsApiV2 } from './customShowsApiV2.js';
import { debugApi } from './debugApi.js';
import { fillerListsApiV2 } from './fillerListsApiV2.js';
import { plexServerApiV2 } from './plexServersApiV2.js';
import { programmingApi } from './programmingApi.js';
import { tasksApiRouter } from './tasksApi.js';
const logger = createLogger(import.meta);
const registerV2Routes: RouterPluginAsyncCallback = async (f) => {
f.addHook('onError', (req, _, error, done) => {
logger.error(req.routeOptions.config.url, error);
done();
});
await f
.register(plexServerApiV2)
.register(tasksApiRouter)
.register(channelsApiV2)
.register(customShowsApiV2)
.register(fillerListsApiV2)
.register(programmingApi)
.register(debugApi);
};
export default registerV2Routes;