-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrerer server til TS og bytter logging
- Loading branch information
1 parent
937ada5
commit 1f21a88
Showing
15 changed files
with
836 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
# production | ||
/build | ||
|
||
/server-build | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { injectDecoratorServerSide } from '@navikt/nav-dekoratoren-moduler/ssr'; | ||
|
||
type DecoratorNaisEnv = 'prod' | 'dev' | 'beta' | 'betaTms' | 'devNext' | 'prodNext'; | ||
|
||
export const getHtmlWithDecorator = (filePath: string) => | ||
injectDecoratorServerSide({ | ||
env: process.env.ENV as DecoratorNaisEnv, | ||
filePath, | ||
params: { | ||
enforceLogin: false, | ||
breadcrumbs: [ | ||
{ url: 'https://www.nav.no/minside/', title: 'Min side' }, | ||
{ url: 'https://www.nav.no/person/personopplysninger/', title: 'Personopplysninger' }, | ||
], | ||
availableLanguages: [ | ||
{ url: 'https://www.nav.no/person/personopplysninger/nb/', locale: 'nb' }, | ||
{ url: 'https://www.nav.no/person/personopplysninger/en/', locale: 'en' }, | ||
{ url: 'https://www.nav.no/person/personopplysninger/nn/', locale: 'nn' }, | ||
], | ||
logoutWarning: true, | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { LoggerOptions, pino } from 'pino'; | ||
|
||
const options = { | ||
formatters: { | ||
level: (label) => { | ||
return { level: label }; | ||
}, | ||
}, | ||
} as LoggerOptions; | ||
|
||
export const logger = pino(options); |
Oops, something went wrong.