This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
Varkes 0.4.0
Pre-release
Pre-release
Features
- app-connector-client
- introduced new "local/apis" endpoint to retrieve bundled API definitions and register them on kyma side using "/local/apis/register" endpoint (#174)
- renamed "/apis" endpoint to "remote/apis" (#174)
- separated auto-register feature into dedicated endpoint "/local/apis/registration" (#174)
- enrich API regsitration with CSRF endpoint info using "csrf"=true attribute in configuration (#185)
- do not register the basepath as part of targetUrl in API registration by setting "registerBasepath"=false (#185)
- odata-mock
- openapi-mock
- "persistence" configuration will enable json file based persistence in folder "./data" (#183)
Usage
Use the modules as express middleware in your express based NodeJs application.
Depending on the modules you require, add the dependencies to your package.json like that:
"dependencies": {
"@varkes/app-connector-client": "^0.4.0",
"@varkes/odata-mock": "^0.4.0",
"@varkes/openapi-mock": "^0.4.0"
}
In your application enable the modules in your express app like that:
const odata = require("@varkes/odata-mock")
const openapi = require("@varkes/openapi-mock")
const connector = require("@varkes/app-connector-client")
const app = require('express')()
app.use(await odata.init("./varkes_config.json"))
app.use(await openapi.init("./varkes_config.json"))
app.use(await connector.init("./varkes_config.json"))
app.listen(10000, function () {
console.info("Started application on port %d", 10000)
})