- TS application listening port: 7777
|-- dist
|-- src
|-- .dockerignore
|-- Dockerfile
var express = require('express'); | |
var passport = require('passport'); | |
var Strategy = require('passport-openidconnect').Strategy; | |
// Configure the OpenID Connect strategy for use by Passport. | |
// | |
// OAuth 2.0-based strategies require a `verify` function which receives the | |
// credential (`accessToken`) for accessing APIs on the user's behalf, along | |
// with the user's profile. The function must invoke `cb` with a user object, |
{ | |
"presets": ["env"] | |
} |
npx -p @angular/cli ng new hello-world-project | |
then locally can run | |
npx ng g c hello-world-component | |
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; | |
import { Observable } from 'rxjs'; | |
@Injectable() | |
export class ExampleUploadInterceptor extends MulterInterceptor implements NestInterceptor { | |
private MAX_FILE_SIZE = 50 * 1024 * 1024; | |
constructor( | |
private fs: FsService, | |
) { |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.groups: | |
- name: node_exporter_alerts | |
rules: | |
- alert: Node down | |
expr: up{job="monitoring-pi"} == 0 | |
for: 2m | |
labels: | |
severity: warning | |
annotations: | |
title: Node {{ $labels.instance }} is down |
const winston = require('winston'); | |
require('winston-daily-rotate-file'); | |
require('winston-mongodb'); | |
const path = require('path'); | |
const PROJECT_ROOT = path.join(__dirname, '..'); | |
const highlight = require('cli-highlight').highlight; | |
const arrow = '\u276F\u276F\u25B6'; | |
const logConfig = { |