У меня есть приложение js gradle.Я не уверен, как запустить приложение локально.
Я выполнил сборку gradle (./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"
]
}