Commit 6bcf116d authored by tiven wang's avatar tiven wang 🤞

Authentication by Approuter

parent 6770e120
node_modules
dist
deployment
\ No newline at end of file
deployment
.env
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "serve-debug",
"cwd": "${workspaceFolder}\\app",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"serve-debug"
],
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Launch TypeScript",
"cwd": "${workspaceFolder}\\app",
"program": "${workspaceFolder}/app/src/index.ts",
"outFiles": [
"${workspaceFolder}/app/**/*.js"
]
}
]
}
\ No newline at end of file
## Build
# SAP Cloud SDK TypeScript version demo
## Build App
In `app` folder:
* start `npm run watch:local`
* build `npm run ci-build`
* package `npm run ci-package`
## Publish Application
In root folder:
`cf push`
## Next steps
* Add grunt
* Add CI/CD on GitLab
* Add docker compose for test locally
\ No newline at end of file
* Add docker compose for test locally
node_modules
src
.env
tsconfig.json
xsuaa.credentials.json
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"start:local": "npx ts-node -r dotenv/config src/",
"watch:local": "nodemon -e ts -w ./src -x npm run serve-debug",
"serve-debug": "node -r ts-node/register --inspect src/index.ts",
"serve-debug": "node -r ts-node/register -r dotenv/config --inspect src/index.ts",
"ci-build": "npx tsc",
"ci-package": "npm prune --production && cp -r dist package.json index.html deployment/",
"ci-backend-unit-test": "nyc --extension .ts --report-dir ./s4hana_pipeline/reports/coverage-reports/backend-unit/ --reporter cobertura mocha -r ts-node/register test/unit-tests/*.spec.ts --reporter mocha-junit-reporter --reporter-options mochaFile=./s4hana_pipeline/reports/backend-unit/results.xml",
......@@ -29,15 +29,16 @@
"@sap/cloud-sdk-vdm-trial-balance-service": "^1.2.1",
"@sap/xsenv": "^2.0.0",
"@sap/xssec": "^2.1.17",
"@types/express": "^4.16.1",
"express": "^4.17.0",
"cfenv": "^1.2.2",
"passport": "^0.4.0",
"ts-node": "^8.1.0",
"typescript": "^3.4.5"
"express": "^4.17.0",
"passport": "^0.4.0"
},
"devDependencies": {
"dotenv": "^8.0.0"
"@types/express": "^4.16.1",
"dotenv": "^8.0.0",
"nodemon": "^1.19.0",
"ts-node": "^8.1.0",
"typescript": "^3.4.5"
},
"engines": {
"node": "10.15.x"
......
......@@ -30,11 +30,5 @@ function getAllBusinessPartners(): Promise<BusinessPartner[]> {
}
export async function businessPartners(req: Request, res: Response) {
// getAllBusinessPartners().then((bps)=> {
// console.log(bps);
// res.status(200).send(bps);
// });
res.status(200).send(await getAllBusinessPartners());
}
\ No newline at end of file
applications:
- name: my-cloud-sdk-demo
path: app/deployment/
path: app/
buildpacks:
- nodejs_buildpack
memory: 256M
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment