栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

后端笔记之eggjs的毕业设计了解

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

后端笔记之eggjs的毕业设计了解

let xhr = new XMLHttpRequest()

    xhr.onreadystatechange = function () {
      if (xhr.readyState === 4) {
        console.log(xhr.responseText)
      }
    }
    xhr.open('get', 'http://127.0.0.1:7002')
    xhr.send() config.cors = {
    origin: '*',
    allowMethods: 'GET,POST',
    // 下面这条加上才能共享跨域session,同时前端ajax请求也要加上响应的参数
    credentials: true,
  };
  config.security = {
    // 关闭csrf验证
    csrf: {
      enable: false,
    },
    // 白名单
    domainWhiteList: ['*'],
  };

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };
module.exports = {
  // had enabled by egg
  // static: {
  //   enable: true,
  // }
  cors: {
    enable: true,
    package: 'egg-cors',
  },
};

//mysql8.0以上加密方式,Node还不支持。
alter user 'root'@'localhost' identified with mysql_native_password by '123456';
//post
  let query = this.ctx.request.body;

  //get
let query = this.ctx.query;
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/284688.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号