Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

node.js - loopback 4 debug strings in embedded server

I'm using the loopback request handler embedded in nuxt server-middleware but cannot get the DEBUG strings to output to my console. I've set the DEBUG env everywhere as well as added {debug: true} directly my dataSource config.

import { Module } from '@nuxt/types';
import { MyApplication } from "../application";
import basePath from './basePath'

const apiServerModule: Module = async function () {
  const app = new MyApplication();
  await app.boot()
  if (this.options.server) {
    await app.start()
  }
  this.options.serverMiddleware.push({
    path: basePath, handler: (req, res, next) => {
      app.requestHandler(req, res)
    }
  })
}

export default apiServerModule

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...