31 lines
838 B
TypeScript
31 lines
838 B
TypeScript
import express from 'express';
|
|
import { H, Handlers } from '@highlight-run/node'
|
|
// @ts-ignore
|
|
import { handler as ssrHandler } from './dist/server/entry.mjs';
|
|
|
|
const highlightConfig = {
|
|
projectID: '1jdkoe52',
|
|
serviceName: "online-energieausweis",
|
|
serviceVersion: "git-sha",
|
|
environment: "production",
|
|
backendUrl: "http://212.227.61.149:3000/public",
|
|
networkRecording: {
|
|
enabled: true,
|
|
recordHeadersAndBody: true,
|
|
},
|
|
}
|
|
|
|
H.init(highlightConfig)
|
|
|
|
const app = express();
|
|
const base = '/';
|
|
app.use(base, express.static('dist/client/'));
|
|
app.use(ssrHandler);
|
|
app.use(express.json({ limit: "50mb" }))
|
|
app.use(express.urlencoded({ limit: "50mb" }))
|
|
app.use(Handlers.middleware(highlightConfig))
|
|
app.use(Handlers.errorHandler(highlightConfig))
|
|
|
|
app.listen(3000, function() {
|
|
console.log('Server started on http://localhost:3000');
|
|
}); |