Last active
May 8, 2021 06:51
-
-
Save mosluce/2f3476faf9da5cec7c97b4853e3c466c to your computer and use it in GitHub Desktop.
vscode + ts + nodemon => backend auto restart development env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "klcc-api-core", | |
"version": "1.0.0", | |
"main": "index.js", | |
"author": "mosluce", | |
"license": "MIT", | |
"dependencies": { | |
"express": "^4.17.1", | |
"parse-server": "4.5.0" | |
}, | |
"scripts": { | |
"build": "rimraf dist && tsc", | |
"start": "node dist/index.js", | |
"start:dev": "nodemon --exec ts-node src/index.ts", | |
"lint": "eslint", | |
"test": "jest" | |
}, | |
"engines": { | |
"node": ">=12" | |
}, | |
"devDependencies": { | |
"@types/express": "^4.17.11", | |
"@types/parse": "^2.18.6", | |
"eslint": "^7.25.0", | |
"eslint-config-prettier": "^8.3.0", | |
"eslint-plugin-prettier": "^3.4.0", | |
"jest": "^26.6.3", | |
"nodemon": "^2.0.7", | |
"prettier": "^2.2.1", | |
"rimraf": "^3.0.2", | |
"ts-node": "^9.1.1", | |
"typescript": "^4.2.4" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 因為 parse-server 使用 flow,所以直接在 vscode 安裝 flow extension 就可以支援了,這邊 bypass ts type check | |
declare module 'parse-server'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"module": "commonjs", | |
"rootDir": "./src", | |
"outDir": "./dist", | |
"esModuleInterop": true, | |
"strict": true, | |
"baseUrl": "./", | |
"paths": { | |
"*": ["node_modules/*", "src/types/*"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment