{
"name": "deploy",
"dependencies": {},
"engines": {
"node": "^8"
},
"scripts": {
"postinstall": "node .build.js",
"start": "node node_modules/@sap/hdi-deploy/deploy.js"
},
"devDependencies": {
"@sap/hdi-deploy": "^3.11.5"
}
}
{
"file_suffixes": {
"csv": {
"plugin_name": "com.sap.hana.di.tabledata.source"
},
"hdbafllangprocedure": {
"plugin_name": "com.sap.hana.di.afllangprocedure"
},
"hdbanalyticprivilege": {
"plugin_name": "com.sap.hana.di.analyticprivilege"
},
"hdbcalculationview": {
"plugin_name": "com.sap.hana.di.calculationview"
},
"hdbcds": {
"plugin_name": "com.sap.hana.di.cds"
},
"hdbcollection": {
"plugin_name": "com.sap.hana.di.collection"
},
"hdbconstraint": {
"plugin_name": "com.sap.hana.di.constraint"
},
"hdbdropcreatetable": {
"plugin_name": "com.sap.hana.di.dropcreatetable"
},
"hdbflowgraph": {
"plugin_name": "com.sap.hana.di.flowgraph"
},
"hdbfulltextindex": {
"plugin_name": "com.sap.hana.di.fulltextindex"
},
"hdbfunction": {
"plugin_name": "com.sap.hana.di.function"
},
"hdbgraphworkspace": {
"plugin_name": "com.sap.hana.di.graphworkspace"
},
"hdbhadoopmrjob": {
"plugin_name": "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"hdbindex": {
"plugin_name": "com.sap.hana.di.index"
},
"hdblibrary": {
"plugin_name": "com.sap.hana.di.library"
},
"hdbmigrationtable": {
"plugin_name": "com.sap.hana.di.table.migration"
},
"hdbprocedure": {
"plugin_name": "com.sap.hana.di.procedure"
},
"hdbprojectionview": {
"plugin_name": "com.sap.hana.di.projectionview"
},
"hdbprojectionviewconfig": {
"plugin_name": "com.sap.hana.di.projectionview.config"
},
"hdbreptask": {
"plugin_name": "com.sap.hana.di.reptask"
},
"hdbresultcache": {
"plugin_name": "com.sap.hana.di.resultcache"
},
"hdbrole": {
"plugin_name": "com.sap.hana.di.role"
},
"hdbroleconfig": {
"plugin_name": "com.sap.hana.di.role.config"
},
"hdbsearchruleset": {
"plugin_name": "com.sap.hana.di.searchruleset"
},
"hdbsequence": {
"plugin_name": "com.sap.hana.di.sequence"
},
"hdbstatistics": {
"plugin_name": "com.sap.hana.di.statistics"
},
"hdbstructuredprivilege": {
"plugin_name": "com.sap.hana.di.structuredprivilege"
},
"hdbsynonym": {
"plugin_name": "com.sap.hana.di.synonym"
},
"hdbsynonymconfig": {
"plugin_name": "com.sap.hana.di.synonym.config"
},
"hdbsystemversioning": {
"plugin_name": "com.sap.hana.di.systemversioning"
},
"hdbtable": {
"plugin_name": "com.sap.hana.di.table"
},
"hdbtabledata": {
"plugin_name": "com.sap.hana.di.tabledata"
},
"hdbtabletype": {
"plugin_name": "com.sap.hana.di.tabletype"
},
"hdbtextconfig": {
"plugin_name": "com.sap.hana.di.textconfig"
},
"hdbtextdict": {
"plugin_name": "com.sap.hana.di.textdictionary"
},
"hdbtextinclude": {
"plugin_name": "com.sap.hana.di.textrule.include"
},
"hdbtextlexicon": {
"plugin_name": "com.sap.hana.di.textrule.lexicon"
},
"hdbtextminingconfig": {
"plugin_name": "com.sap.hana.di.textminingconfig"
},
"hdbtextrule": {
"plugin_name": "com.sap.hana.di.textrule"
},
"hdbtrigger": {
"plugin_name": "com.sap.hana.di.trigger"
},
"hdbview": {
"plugin_name": "com.sap.hana.di.view"
},
"hdbvirtualfunction": {
"plugin_name": "com.sap.hana.di.virtualfunction"
},
"hdbvirtualfunctionconfig": {
"plugin_name": "com.sap.hana.di.virtualfunction.config"
},
"hdbvirtualpackagehadoop": {
"plugin_name": "com.sap.hana.di.virtualpackage.hadoop"
},
"hdbvirtualpackagesparksql": {
"plugin_name": "com.sap.hana.di.virtualpackage.sparksql"
},
"hdbvirtualprocedure": {
"plugin_name": "com.sap.hana.di.virtualprocedure"
},
"hdbvirtualprocedureconfig": {
"plugin_name": "com.sap.hana.di.virtualprocedure.config"
},
"hdbvirtualtable": {
"plugin_name": "com.sap.hana.di.virtualtable"
},
"hdbvirtualtableconfig": {
"plugin_name": "com.sap.hana.di.virtualtable.config"
},
"jar": {
"plugin_name": "com.sap.hana.di.virtualfunctionpackage.hadoop"
},
"properties": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"tags": {
"plugin_name": "com.sap.hana.di.tabledata.properties"
},
"txt": {
"plugin_name": "com.sap.hana.di.copyonly"
}
}
}const fs = require('fs');
const childproc = require('child_process');
if (fs.existsSync('../package.json')) {
// true at build-time, false at CF staging time
childproc.execSync('npm install && npm run build', {
cwd: '..',
stdio: 'inherit'
});
}
{
"build": {
"target": ".",
"tasks": [
{
"for": "hana",
"src": "db",
"options": {
"model": [
"db",
"srv",
"index.cds"
]
}
},
{
"for": "node-cf",
"src": "srv",
"options": {
"model": [
"db",
"srv",
"index.cds"
]
}
}
]
}
}
{
"name": "sap-cap-epl",
"version": "1.0.0",
"description": "Generated by cds init",
"repository": "<Add your repository here>",
"license": "ISC",
"dependencies": {
"@sap/cds": "^3.18.3",
"express": "^4.17.1",
"hdb": "^0.17.1"
},
"engines": {
"node": "^8.9"
},
"scripts": {
"build": "cds build/all --clean",
"deploy": "cds deploy",
"start": "cds run",
"watch": "cds deploy --to sqlite:db/epl.db && cds watch .",
"build:mta": "cds build/all && mbt build -p=cf",
"deploy:cf": "npm run build:mta && cf deploy mta_archives/${npm_package_name}_${npm_package_version}.mtar"
},
"files": [
"srv",
"db",
"index.cds"
],
"cds": {
"odata": {
"version": "v4"
},
"requires": {
"db": {
"kind": "sqlite",
"model": [
"db",
"srv"
],
"credentials": {
"database": "db/epl.db"
},
"[production]": {
"kind": "hana"
}
}
}
},
"devDependencies": {
"sqlite3": "^4.1.0"
}
}
_schema-version: 2.0.0
ID: sap-cap-epl
version: 1.0.0
modules:
- name: sap-cap-epl-db
type: hdb
path: db
parameters:
memory: 256M
disk-quota: 256M
requires:
- name: sap-cap-epl-db-hdi-container
- name: sap-cap-epl-srv
type: nodejs
path: srv
parameters:
memory: 512M
disk-quota: 256M
provides:
- name: srv_api
properties:
url: ${default-url}
requires:
- name: sap-cap-epl-db-hdi-container
- name: sap-cap-epl-uaa
- name: sap-cap-epl-ui
type: nodejs
path: app
parameters:
memory: 256M
disk-quota: 256M
requires:
- name: srv_api
group: destinations
properties:
forwardAuthToken: true
strictSSL: true
name: srv_api
url: ~{url}
resources:
- name: sap-cap-epl-uaa
type: org.cloudfoundry.managed-service
parameters:
service-plan: application
service: xsuaa
config:
xsappname: sap-cap-epl-${space}
tenant-mode: dedicated
- name: sap-cap-epl-db-hdi-container
type: com.sap.xs.hdi-container
properties:
hdi-container-name: ${service-name}
parameters:
service: hanatrial{
"xsappname": "epl-cap-app",
"tenant-mode": "dedicated",
"description": "Security profile of called application",
"scopes": [
{
"name": "uaa.user",
"description": "UAA"
}
],
"role-templates": [
{
"name": "TESTUSER",
"description": "UAA",
"scope-references": [
"uaa.user"
]
}
]
}set CDS_ENV=production
cf deploy
{
"name": "project-srv",
"version": "1.0.0",
"dependencies": {
"@sap/cds": "^3.18.3",
"express": "^4.17.1",
"@sap/hana-client": "^2.4.144"
},
"engines": {
"node": "^10"
},
"scripts": {
"start": "cds serve gen/csn.json"
},
"cds": {
"requires": {
"db": {
"kind": "hana",
"model": "gen/csn.json"
}
}
}
}
{
"name": "epl-app-ui",
"dependencies": {
"@sap/approuter": "^6.5.1"
},
"engines": {
"node": "^10"
},
"scripts": {
"start": "node node_modules/@sap/approuter/approuter.js"
}
}{
"welcomeFile": "webapp/",
"authenticationMethod": "none",
"routes": [{
"source": "^/webapp/(.*)$",
"target": "$1",
"localDir": "webapp/"
}, {
"source": "^(.*)$",
"destination": "srv_api"
}]
}
set CDS_ENV=production
cf runnpm run build:mta
# "build:mta": "cds build/all && mbt build -p=cf",npm run deploy:cf
# "deploy:cf": "npm run build:mta && cf deploy mta_archives/${npm_package_name}_${npm_package_version}.mtar"
# for Windows Users
npm run build:mta && cf deploy mta_archives/%npm_package_name%_%npm_package_version%.mtar

cf a
# 3 apps
cf s
# 2 services
cf undeploy sap-cap-epl --delete-services -f
cf a
# 0 apps
cf s
# 0 services
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 6 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 |