Skip to content

Commit 03cbb7a

Browse files
committed
Merge branch 'refs/heads/next' into feat/add-architect
2 parents 49ba3a5 + 4674452 commit 03cbb7a

22 files changed

Lines changed: 405 additions & 416 deletions

File tree

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
# CONTAINER_BUILD: 采用容器构建
77
#
88

9-
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:20.17.0-alpine AS build_base
9+
FROM registry.cn-hangzhou.aliyuncs.com/142vip-infra/node:20.18.0-alpine AS build_base
1010

1111
# 是否配置代理
12-
ARG NEED_PROXY=false
12+
ARG NEED_PROXY_BUILD=false
1313

14+
ENV NODE_OPTIONS="--max-old-space-size=200000"
1415
# 设置环境变量,支持容器构建时使用layer缓存,参考:https://pnpm.io/zh/docker
1516
ENV PNPM_HOME="/pnpm"
1617
ENV PATH="$PNPM_HOME:$PATH"
@@ -19,20 +20,20 @@ ENV PATH="$PNPM_HOME:$PATH"
1920
#ENV COREPACK_NPM_REGISTRY=https://mirrors.tencent.com/npm/
2021

2122
WORKDIR /apps
23+
2224
COPY . .
2325

2426
# 基于容器自动构建
25-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci && \
26-
if [ "$NEED_PROXY" = "false" ]; \
27+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci --ignore-scripts && \
28+
if [ "$NEED_PROXY_BUILD" = "false" ]; \
2729
then \
2830
pnpm build; \
2931
else \
3032
pnpm build:proxy; \
3133
fi;
3234

3335
# 构建linux镜像
34-
#FROM --platform=linux/amd64 nginx:1.27.0-alpine
35-
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.27.0-alpine
36+
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.29.0-alpine
3637

3738
# 自定义镜像的Label信息
3839
ARG APP_NAME

code/express/apps/static-source-demo/Readme.md renamed to code/express/apps/static-source-demo/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Express框架不仅给出了前后端混合开发的解决方案,针对不同
1919

2020
```js
2121
const express = require('express')
22+
2223
const app = express()
2324
// 服务启动端口
2425
const port = 3000

docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# #
22
# 服务名: JavaScriptCollection
33
# IP范围: 172.30.0.200
4+
# 镜像拉取慢,在阿里云服务器上,可以考虑走vpc网络:registry-vpc.cn-hangzhou.aliyuncs.com
45
#
56
version: '2'
67
services:

docs/microservice/docker/docker-backup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* - ./scripts/docker network xxx 网络相关
1212
*/
1313
const { execShell } = require('./.exec')
14+
1415
const scriptName = process.argv[2]
1516

1617
/**

docs/read-books/cs-books/ES6标准入门.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,9 +3095,9 @@ Array.of(3).length // 1
30953095
弥补数组构造函数`Array()`的不足。因为参数个数的不同,会导致`Array()`的行为有差异。
30963096

30973097
```js
3098-
new Array() // []
3098+
[] // []
30993099
Array.from({ length: 3 }) // [, , ,]
3100-
new Array(3, 11, 8) // [3, 11, 8]
3100+
;[3, 11, 8] // [3, 11, 8]
31013101
```
31023102

31033103
`Array()`方法没有参数、一个参数、三个参数时,返回的结果都不一样。
@@ -4854,6 +4854,7 @@ Object.fromEntries(map)
48544854
```js
48554855
// url模块中获取URLSearchParams
48564856
const { URLSearchParams } = require('node:url')
4857+
48574858
Object.fromEntries(new URLSearchParams('name=bob&age=24'))
48584859
// { name: "bob", age: 24 }
48594860
```

docs/read-books/cs-books/更了不起的Node.js.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,7 @@ event.setMaxListeners(100)
12831283

12841284
```js
12851285
const eventEmitter = require('node:events')
1286+
12861287
const myEmitter = new EventEmitter()
12871288

12881289
function testConnection(param) {

docs/server-end/framework/egg/tutorial/快速入门.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ $ npm i moment --save
321321
```js
322322
// app/extend/helper.js
323323
const moment = require('moment')
324+
324325
exports.relativeTime = time => moment(new Date(time * 1000)).fromNow()
325326
```
326327

docs/server-end/framework/egg/tutorial/服务.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ module.exports = (app) => {
8484

8585
// app/controller/user.js
8686
const Controller = require('egg').Controller
87+
8788
class UserController extends Controller {
8889
async info() {
8990
const { ctx } = this
@@ -96,6 +97,7 @@ module.exports = UserController
9697

9798
// app/service/user.js
9899
const Service = require('egg').Service
100+
99101
class UserService extends Service {
100102
// 默认不需要提供构造函数。
101103
// constructor(ctx) {

docs/server-end/framework/express/tutorial/模板项目.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ lsof -i:3000
9696

9797
```js
9898
const express = require('express')
99+
99100
const router = express.Router()
100101

101102
/* GET users listing. */
@@ -110,6 +111,7 @@ module.exports = router
110111

111112
```js
112113
const express = require('express')
114+
113115
const router = express.Router()
114116

115117
/* GET home page. */

docs/server-end/framework/express/tutorial/静态文件.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Express框架不仅给出了前后端混合开发的解决方案,针对不同
2424

2525
```js
2626
const express = require('express')
27+
2728
const app = express()
2829
// 服务启动端口
2930
const port = 3000

0 commit comments

Comments
 (0)