This is the Dedi on Matrix server
npm install @dediapp/serverNode.js library that implements a Dedi-on-Matrix server.
Example using express:
``js
import express from 'express'
import DediServer from '@dediapp/server'
// if configuration is in default file (/etc/dedi/server.conf)
const dediServer = new DediServer()
// else if configuration is in a different file, set DEDI_SERVER_CONF
process.env.DEDI_SERVER_CONF = '/path/to/config/file'
const dediServer = new DediVaultAPI()
// You can also give configuration directly
const dediServer = new DediVaultAPI(config)
const app = express()
dediServer.ready
.then(() => {
app.use(dediServer.endpoints)
const port = process.argv[2] != null ? parseInt(process.argv[2]) : 3000
console.log(Listening on port ${port})``
app.listen(port)
})
.catch((e) => {
throw e
})
Configuration file is a JSON file. The default values are
in src/config.json.
Copyright (c) 2023-present DediApp
License: GNU AFFERO GENERAL PUBLIC LICENSE