Skip to content

Commit

Permalink
feat: init repo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaosansiji committed May 24, 2022
0 parents commit 77d07c2
Show file tree
Hide file tree
Showing 42 changed files with 12,786 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*]
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true

[package.json]
indent_size = 2
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
snapshot*
dist
lib
node_modules
common
26 changes: 26 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"plugins": [
"@typescript-eslint"
],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"sourceType": "module",
"allowImportExportEverywhere": true
},
"rules": {
"no-param-reassign": 0,
"camelcase": 1,
"no-new": 1,
"new-cap": 0,
"no-underscore-dangle": 0,
"func-style": 0,
"no-console": ["error", { "allow": ["warn", "error"] }],
"@typescript-eslint/no-explicit-any": 0
}
}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

.DS_Store
.vscode
node_modules
dist
temp
Binary file added db/TDesign.db
Binary file not shown.
20 changes: 20 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const { name } = require('./package.json');
const path = require('path');

module.exports = {
apps: [
{
name,
script: path.resolve(__dirname, './dist/server/app.js'),
instances: require('os').cpus().length,
instance_var: name, // 运行实例的名称
autorestart: true,
exec_mode: 'cluster',
watch: true,
env_production: {
NODE_ENV: 'prod',
},
},
],
};
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-node -r tsconfig-paths/register src/server/app.ts"
}

Loading

0 comments on commit 77d07c2

Please sign in to comment.