@dediapp/server
v1.0.0
Published
This is the Dedi on Matrix server
Downloads
25
Readme
@dediapp/vault-api
Node.js library that implements a Dedi-on-Matrix server.
Synopsis
Example using express:
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
Configuration file is a JSON file. The default values are in src/config.json.
Copyright and license
Copyright (c) 2023-present DediApp https://dedim.com.tr
License: GNU AFFERO GENERAL PUBLIC LICENSE
