problem description 1. App modules,modules is built in mvc mode, and there are files corresponding to business logic in modeules, such as login, user management, rights management, role management. And so on, each file has a corresponding routing conf...
egg application. A function is as follows: function abc(arg) { assert(typeof arg === string , arg should be a string ); do other thing ... } if the parameter is of non-string type, the assert statement will be triggered an...
token async getLocalAccessToken() { const token = await fs.readFile( wechatToken. txt , utf8 , (err, data) => { return token; }); return token; } accesstoken async updateMenu() { const access_token = await...
recently, when using the template engine under eggjs, you need to use the ctx.renderView method to return the content in the template, but it is found that the returned content will have blank lines and spaces, because there is a site after the template...
1.publicconfig.default.js question: why http: localhost:9999 cannot directly access the front-end interface, and why I cannot find the http: localhost:9999 device_monitor path at the address. ...
I write authentication interface in middleware authenticate.js module.exports = options => { return async function auth(ctx, next) { console.log( 99999999999999999 ) let { app } = this const { redis } = app; let...
upload an image from the front end, and at the back end, get the following temporary path: var folders 5y 3cm_1kws4r18wmx5n2l9ntzm0000gn T egg-multipart-tmp multipart-file-mode-example 2018 10 29 14 5eb8f5b7-a1d5-4b6a-9cf0-4fcc80bab4f0.png I want ...
problem description egg project uses mongoose mongoose to report error failed to connect to server, PRIMARY:hostA, master node SECONDARY:hostB, hostC; slave node one master and two slaves, both ports are 27017 copy set set:rs0 Url: mongodb: ...
problem description egg project uses mongoose mongoose to report error failed to connect to server, PRIMARY:hostA, master node SECONDARY:hostB, hostC; slave node one master and two slaves, both ports are 27017 copy set set:rs0 Url: mongodb: ...
problem description use eggjs to build a website backend service. uses eggjs scaffolding egg-init to quickly build a frame. when started with npm start under windows, a lot of pop-up boxes will appear. related codes the specific start configur...
such as the question, how did you get that? as follows: this.ctx.config unable to get content ...
how to deploy the eggjs used in the vue backend api for the front end? which folder of the packaged vue project is placed in egg? how to configure it? please give us some advice ...
how Egg supports cross-domain requests for a single interface, but not all interfaces of the service can be cross-domain requests ~ tried the following method: async XXX () { const { ctx } = this; ctx.set( Access-Control-Allow-Origin , * ...
the model, created by sequelize-cli modifies the foreign key associate hasMany and other relationships, how to Synchronize this foreign key relationship to the database? ...
after reading the official tutorials and examples of egg, all you can get is the processed path. If the path is passed into sharp, it will report an error and cannot be compressed. Is there any way to get the original path of uploading pictures? relat...
when developing locally, there is no problem. After deployment, the front-end access to api reports 405, but access through postman is no problem. Trying egg-cors, does not seem to be work, want to know if it s the nginx configuration or the posture ...
I now have a problem. I am using Egg.js,Egg.js to enable csrf,POST requests by default. All csrf,POST requests need to be accompanied by csrf headers. CsrfToken is in Cookie. The problem is that my first access is a POST request, but there is no csrfToe...
problem description for node applications built with egg, Node serves as an intermediate server, providing server rendering and requesting data from the server. After deployment to the server, memory growth occurs continuously, which is suspected to b...
use strict ; module.exports = appInfo => { const config = {}; should change to your own config.keys = appInfo.name + _sequelize-example ; config.sequelize = { dialect: mssql , support: mysql, mariadb, postgres, mssql ...
egg breakpoint debugging launch.json is normal according to the network settings, and all breakpoints are invalid after startup. have no choice but to ask for help. ...