Files
speckle-server/packages/server/modules/core/index.js
T
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00

32 lines
879 B
JavaScript

'use strict'
const { registerOrUpdateScope, registerOrUpdateRole } = require('@/modules/shared')
const { moduleLogger } = require('@/logging/logging')
exports.init = async (app) => {
moduleLogger.info('💥 Init core module')
// Initialize the static route
require('./rest/static')(app)
// Initialises the two main bulk upload/download endpoints
require('./rest/upload')(app)
require('./rest/download')(app)
// Initialises the two diff-based upload/download endpoints
require('./rest/diffUpload')(app)
require('./rest/diffDownload')(app)
// Register core-based scoeps
const scopes = require('./scopes.js')
for (const scope of scopes) {
await registerOrUpdateScope(scope)
}
// Register core-based roles
const roles = require('./roles.js')
for (const role of roles) {
await registerOrUpdateRole(role)
}
}
exports.finalize = () => {}