【发布时间】:2019-08-29 09:44:22
【问题描述】:
我有一个节点 js gradle 应用程序。我不确定如何在本地运行应用程序。
我已经完成了 gradle build (./gradlew) 和 npm run build(compile)。我所有的依赖都在node_modules。
我有一个 server.ts 文件,其中包含除路由之外的服务器代码。
我的 package.json-
{
"name": "app",
"version": "..",
"description": "",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"prepublish": "npm run build",
"build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"async-child-process": "^1.1.1",
..
},
"devDependencies": {
"@types/handlebars": "^4.0.36",
"@types/node": "^8.10.45",
"@types/pg-types": "^1.11.4"
}
}
如何在服务器上运行项目。
tsconfig.json
{
"compilerOptions": {
"outDir": "./build/js/",
"sourceMap": false,
"noImplicitAny": false,
"module": "commonjs",
"declaration":true,
"target": "es2015"
},
"include": [
"src/main/ts/**/*.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
【问题讨论】:
-
@MarS 用 package.json 更新
标签: node.js typescript npm