create-aomex 0.0.68 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-aomex",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "repository": "git@github.com:aomex/create-aomex.git",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/templates/.env CHANGED
@@ -1 +1 @@
1
- DATABASE_URL=mysql://my_user:my_pwd@localhost:3306/{{projectName}}
1
+ DATABASE_URL=mysql://root:abcde@localhost:3306/{{projectName}}
@@ -7,9 +7,8 @@ RUN mv .env.integration .env
7
7
  ENV TZ=Asia/Shanghai
8
8
  ENV PORT=3000
9
9
  ENV NODE_ENV=integration
10
- ENV NODE_OPTIONS='--enable-source-maps --stack-trace-limit=50'
11
10
  ENV PATH="$PATH:/codes/node_modules/.bin"
12
11
 
13
12
  RUN sh scripts/build-in-docker.sh
14
13
 
15
- CMD ["node", "src/web.js"]
14
+ CMD ["node", "--enable-source-maps", "--stack-trace-limit=50", "src/web.js"]
@@ -7,9 +7,8 @@ RUN mv .env.production .env
7
7
  ENV TZ=Asia/Shanghai
8
8
  ENV PORT=3000
9
9
  ENV NODE_ENV=production
10
- ENV NODE_OPTIONS='--enable-source-maps --stack-trace-limit=50'
11
10
  ENV PATH="$PATH:/codes/node_modules/.bin"
12
11
 
13
12
  RUN sh scripts/build-in-docker.sh
14
13
 
15
- CMD ["node", "src/web.js"]
14
+ CMD ["node", "--enable-source-maps", "--stack-trace-limit=50", "src/web.js"]
@@ -5,8 +5,6 @@ services:
5
5
  MYSQL_ROOT_PASSWORD: 'abcde'
6
6
  # 修改后需要同步修改.env里的参数
7
7
  MYSQL_DATABASE: '{{projectName}}'
8
- MYSQL_USER: 'my_user'
9
- MYSQL_PASSWORD: 'my_pwd'
10
8
  volumes:
11
9
  - ./volumes/mysql:/var/lib/mysql
12
10
  ports:
@@ -19,7 +17,7 @@ services:
19
17
  timeout: 3s
20
18
  retries: 10
21
19
  redis:
22
- image: redis:8.0-M04
20
+ image: redis:8.0
23
21
  volumes:
24
22
  - ./volumes/redis:/data
25
23
  ports:
@@ -1,20 +1,17 @@
1
1
  import { rule } from '@aomex/common';
2
- import { query, response, Router } from '@aomex/web';
2
+ import { response, Router } from '@aomex/web';
3
3
 
4
4
  export const router = new Router();
5
5
 
6
6
  router.get('/', {
7
+ docs: { showInOpenapi: false },
7
8
  mount: [
8
- query({
9
- user: rule.string().optional(),
10
- }),
11
9
  response({
12
10
  statusCode: 200,
13
11
  content: rule.string(),
14
12
  }),
15
13
  ],
16
14
  action: (ctx) => {
17
- const { user = 'World' } = ctx.query;
18
- ctx.send(`Hello ${user}`);
15
+ ctx.send('Hello World');
19
16
  },
20
17
  });
@@ -52,7 +52,8 @@ if (cluster.isPrimary) {
52
52
  logger.info(`Worker ${worker.id} is listening ${href}`);
53
53
  })
54
54
  .on('exit', (worker, code, signal) => {
55
- logger.error(`Worker ${worker.id} exit with code '${code}' and signal '${signal}'`);
55
+ const msg = `Worker ${worker.id} exit with code '${code}' and signal '${signal}'`;
56
+ logger.error(msg);
56
57
  cluster.fork();
57
58
  });
58
59
  }
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "es2022",
4
- "module": "es2022",
5
- "lib": ["ESNext"],
3
+ "target": "esnext",
4
+ "module": "esnext",
6
5
  "strict": true,
7
6
  "esModuleInterop": true,
8
7
  "skipLibCheck": true,