typescript
concurrently
yarn global add typescript concurrently ts-node ts-node-dev
yarn
yarn start
安装mysql数据库,config在server/config/index里 约定用户名root 密码root CREATE DATABASE sea_ele source server/db/init.db
yarn start
yarn client-dev
yarn server-dev
vscode: 点击调试,添加配置,配置中添加
{
"name": "ts-node",
"type": "node",
"request": "launch",
"protocol": "inspector",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/ts-node",
"runtimeArgs": [
"${workspaceRoot}/server/src/app.ts"
]
}
然后 tsc启动后端编译就可以在vscode中调试