zitadel/site/src/server.js
Max Peintner 2c517d6278
feat(documentation): svelte app as document generator (#566)
* check in full site application

* rm unused assets components

* change base css

* i18n

* new doc workflow

* fix crosslink to doc in github

* nav, console link, assets, console brand

* edit configjs server

* rm go struct references

* cleanup input output bindings

* working dir

* export path

* always trigger

* rel paths

* cname

* rev workdir

* fix fallbacklanguage, home on large screens

* remove mit from site
2020-08-11 09:53:09 +02:00

21 lines
489 B
JavaScript

import * as sapper from '@sapper/server';
import compression from 'compression';
import polka from 'polka';
import sirv from 'sirv';
import { i18nMiddleware } from './i18n.js';
const { PORT, NODE_ENV } = process.env;
const dev = NODE_ENV === 'development';
polka()
.use(
compression({ threshold: 0 }),
sirv('static', { dev }),
i18nMiddleware(),
sapper.middleware()
)
.listen(PORT, err => {
if (err) console.log('error', err);
});