https://github.com/swisscom/cf-sample-app-nodejs-mysql
Sample Cloud Foundry Node.js App with mTLS MySQL
https://github.com/swisscom/cf-sample-app-nodejs-mysql
Last synced: 6 months ago
JSON representation
Sample Cloud Foundry Node.js App with mTLS MySQL
- Host: GitHub
- URL: https://github.com/swisscom/cf-sample-app-nodejs-mysql
- Owner: swisscom
- License: mit
- Created: 2019-01-15T12:15:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T15:16:26.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T22:02:05.487Z (over 1 year ago)
- Language: HTML
- Size: 1.2 MB
- Stars: 0
- Watchers: 19
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Node.js Sample MySQL App
This sample app is based on the Swisscom [Node.js Sample App](https://github.com/swisscom/cf-sample-app-nodejs.git) and adds a simple REST API showcasing the new MySQL service with mTLS connection.
Following REST Endpoints are available:
`GET /mysql` Lists entries
`POST /mysql/:entry` (no body) Writes the entry in the path to the database.
## Prerequisite
MySQL Database `mysqldb` is created, this can be done as follows:
```
cf create-service mysql xsmall mysql-cluster
cf create-service mysql-database default mysqldb -c "{\"parent_reference\":\"$(cf service mysql-cluster --guid)\"}"
```
## Deployment
All necessary config is taken care of, simply push the app with `cf push`.
https://docs.cloudfoundry.org/buildpacks/node/node-tips.html