草庐IT

application-server

全部标签

javascript - 带有 Lambda 的 Graphql Yaga Playground - "Server cannot be reached"

我正在使用servlerless/lambda设置graphql端点,并且在尝试连接到graphql-yoga附带的graphqlplayground时收到错误。当我去到有Playground(/playground)的路线时,它会启动Playground界面,但它只是说:Servercannotbereached在Playground的右上角。值得注意的是,我正在使用makeRemoteExecutableSchema实用程序来代理到另一个graphql端点(这是我的名为Prismic的CMS)。我不认为这是问题所在,因为在普通的快速服务器上进行测试时,我已经成功地将它连接到Play

javascript - webpack-dev-server 运行两次

我已经尝试用几种不同的方法解决这个问题,所以我必须从头开始。我有一个名为webpack.dev.js的配置文件,如图所示:constpath=require("path");constHtmlWebpackPlugin=require("html-webpack-plugin");constExtractTextPlugin=require("extract-text-webpack-plugin");constCopyWebpackPlugin=require("copy-webpack-plugin");module.exports={entry:"./src/script.js"

javascript - application/json-p text/json-p 已经可以实现了吗?

我读过http://www.json-p.org/它声明了一个更安全、更严格的JSON-P子集。ThemostcriticalpieceofthisproposalisthatbrowservendorsmustbegintoenforcethisruleforscripttagsthatarereceivingJSON-Pcontent,andthrowerrors(oratleaststopprocessing)onanynon-conformingJSON-Pcontent.我的问题是JSON-P的子集是否已经可以实现? 最佳答案

javascript - 错误 : Resource interpreted as Document but transferred with MIME type application/pdf

我正在从我的服务器向客户端发送PDF流,然后在中显示该PDF客户端中的标记。这是我的代码:server.jsrouter.get('/pdf',function*(){varstream=getMyFileStream();this.set('Content-Type','application/pdf');this.response.body=stream;});client.jsvarobjectElement=document.querySelector('object');fetch('/pdf',request).then(res=>res.blob()).then(blob

javascript - 带有凭据的 Webpack-dev-server CORS 错误

我在热模块重新加载时遇到CORS问题-开发服务器。我在3000端口上使用开发服务器,但应用程序是从另一个端口http://localhost:52024/提供服务的。这是我遇到的错误(Chrome、Windows10):GEThttp://localhost:3000//sockjs-node/info?t=1502216500095404(NotFound)XMLHttpRequestcannotloadhttp://localhost:3000//sockjs-node/info?t=1502216500095.Thevalueofthe'Access-Control-Allow-

javascript - three.js 问题 : application suddenly wont work on Chrome - old code, 无法与新的 three.js 库一起使用

前一段时间我写了几个three.js(R48)应用程序,它们一直运行良好,直到几周后我发现它们不再适用于Chrome。以下是前几条错误消息:WebGL:INVALID_OPERATION:getAttribLocation:programnotlinkedskyWheel.html:18WebGL:INVALID_OPERATION:getUniformLocation:programnotlinkedskyWheel.html:1CouldnotinitialiseshaderVALIDATE_STATUS:false,glerror[1282]Three.js:35529WebGL

javascript - 在 webpack bundle 中运行 Webpack Dev Server

我有一个运行Express的Node服务器的webpack配置。入口文件如果在生产中运行Express服务器,如果在开发中也运行ExpressServer和WebpackDevServer。问题出在webpackdevserver初始化的时候;它提示UnhandledrejectionError:invalidargument或找不到路径。webpackdev服务器中使用的客户端配置在CLI中单独使用时运行良好,当webpackdevserver在常规(未捆绑)文件中初始化时也可以正常工作。每种方法的不同之处在于,从配置中打印的路径在有效和无效的情况下是不同的。这些路径是从__dirn

javascript - 如何使 webpack typescript react webpack-dev-server 配置以自动构建和重新加载页面

我的意图是有这样的目录结构:-/my-project/--/src/(hereareall.tsxfileslocated)--/dist/-index.html-/build/-bundle.js--/node_modules/--package.json--tsconfig.json--webpack.config.js所以,我想要我的index.html,它是在/dist子目录中手动创建的,在它里面我想要/buildsubdir,webpack制作的app.js所在的位置。我希望当我保存一些位于我的/src目录中的.tsx文件时,webpack会自动重建app.js并且webpa

javascript - Vue.js : Vuetify server side Datatable search filter not working

我正在为我的数据表使用vuetify。除搜索过滤器外,分页和排序都在工作。来自搜索过滤器的响应数据是正确的,但问题是它没有呈现对我的模板的响应。在vuetify文档那里只有分页和排序。我正在尝试通过服务器端实现搜索功能。我的用户.vueexportdefault{data(){return{max25chars:(v)=>v.length{constself=this;self.items=data.items;self.totalItems=data.total;})},deep:true}},mounted(){this.getDataFromApi().then(data=>{t

javascript - gulp karma 测试 TypeError : Server is not a function

尝试使用gulp运行karma以运行测试,但遵循以下示例:https://github.com/karma-runner/gulp-karma我的gulp文件:vargulp=require('gulp');varServer=require('karma').Server;/***Runtestonceandexit*/gulp.task('test',function(done){newServer({configFile:__dirname+'/karma.conf.js',singleRun:true},done).start();});/***Watchforfilechan