itee-server
v6.2.7
Published
The server side of the Itee solution for 3d web content, this package is design to work with an Itee client.
Downloads
47
Maintainers
Readme
From npm:
npm install itee-server
If you want to build the repository from source follow these instructions:
git clone https://github.com/Itee/itee-server.git
npm install
npm run build
npm run doc
then you will be able to use like this:
import { TBackendManager } from 'itee-server'
const backendManager = new TBackendManager({
rootPath: path.join( __dirname, '..', 'servers' ),
databases: [
{
type: 'TMongoDBDatabase',
name: 'MongoDB',
databaseUrl: `mongodb://127.0.0.1:27017/mydb`,
plugins: []
}
],
applications: {
// All express configs, see: https://expressjs.com/en/4x/api.html#app.set
env: process.env.NODE_ENV,
// All express middleswares
middlewares: {
morgan: {
interval: '1d',
directoryPath: path.join( __dirname, '..', 'servers/logs/access.log' ),
fileName: 'access.log'
},
favicon: {
path: path.join( __dirname, '..', 'servers/resources/favicon.ico' )
},
//...
},
// Static routers
routers: {
'/': 'index/index.js',
'/downloads': 'downloads/downloads.js',
'/resources': 'resources/resources.js'
},
},
servers: {
type: 'http',
max_headers_count: 1100,
timeout: 30000
}
})