@matrx/svelte-realtime-adapter-cosmos-db-temporal

    0.6.0 • Public • Published

    @matrx/svelte-realtime-adapter-cosmos-db

    svelte-realtime-adapter-cosmos-db is a database adapter for the svelte-realtime-coordinator. For a summary of how to use all of the svelte-realtime-... packages, go over to the svelte-realtime-store.

    Usage

    To install with npm

    npm install --save @matrx/svelte-realtime-adapter-cosmos-db

    Modify your server.js file to look something like this

    import http from 'http'
    import sirv from 'sirv'
    import express from 'express'
    import compression from 'compression'
    import * as sapper from '@sapper/server'
    import uuidv4 from 'uuid/v4'
     
    // Look here
    import { getServer } from '@matrx/svelte-realtime-server'
     
    const { PORT, NODE_ENV } = process.env
    const dev = NODE_ENV === 'development'
     
    const app = express()
    const server = http.createServer(app)
     
    // And here
    const nsp = getServer(server)
      
    app.use(
        compression({ threshold: 0 }),
        sirv('static', { dev }),
        sapper.middleware()
    )
     
    server.listen(PORT, err => {
        if (err) console.log('error', err);
    })
     

    Install

    npm i @matrx/svelte-realtime-adapter-cosmos-db-temporal

    DownloadsWeekly Downloads

    7

    Version

    0.6.0

    License

    MIT

    Unpacked Size

    13.6 kB

    Total Files

    7

    Last publish

    Collaborators

    • lmaccherone
    • morganmaccherone