node.js - 为什么带有灯塔的 chrome 审计中的节点这么慢?
问题描述
我刚刚创建了一个单页js,如下所示:
// Load HTTP module
var http = require("http");
// Create HTTP server and listen on port 8000 for requests
http.createServer(function(request, response) {
// Set the response HTTP header with HTTP status and Content type
response.writeHead(200, {'Content-Type': 'text/plain'});
// Send the response body "Hello World"
response.end('Hello World\n');
}).listen(57777);
// Print URL for accessing server
console.log('Server running at http://127.0.0.1:57777/');
所以它托管在 localhost:57777 上。这是它的审计结果。
我开始学习 express 以提高我的 Angular SSR 性能,但在这里我看到一个带有文本响应的空白项目在性能上是如此糟糕,那么我怎么能期望我的 Angular 应用程序更好。我可以修复性能滞后吗?
或者我应该转向 laravel 或其他 PHP 框架以提高性能,因为我花了很多时间 Angular 并且应用程序仍然不是那么好。
这是我的 Angular Universal 项目的报告,它无法继续部署。
有没有办法改进上述我正在遵循这个 Universal Starter 的配置
我也关注了这些博客,但没有任何帮助:
解决方案
推荐阅读
- javascript - 在全日历周视图中自定义放置多个时间轴
- css - React:使盒子大小相同,即使内容不同
- python - Python Django NSException 的问题
- resharper - 是否可以在 Rider/Resharper 中导航到课堂上的符号?
- html - 如何使用 Liquid 遍历 YAML 文件的特定部分?
- python - 使用 python 搜索 Json 目录
- soap - Renaming an XML/SOAP tag using Apache CXF
- unit-testing - 在这个例子中如何模拟 api 调用?
- angular - 当占位符选项处于选中状态时,ng-select 发送“NULL”而不是空字符串
- c++ - 从 TFlite 中的 typed_output_tensor 中提取输出数据