Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/no9/ce-nodejs-mysql
sample application to connect node.js to a mysql instance using Code Engine
https://github.com/no9/ce-nodejs-mysql
Last synced: 5 days ago
JSON representation
sample application to connect node.js to a mysql instance using Code Engine
- Host: GitHub
- URL: https://github.com/no9/ce-nodejs-mysql
- Owner: No9
- License: mit
- Created: 2023-03-25T08:45:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-20T00:34:48.000Z (over 1 year ago)
- Last Synced: 2024-10-31T06:06:44.977Z (about 2 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ce-nodejs-mysql
A sample application to connect node.js to a IBM Cloud Databases for MySQL targetting use in code engine.
This project aims to illustrate the mysql options once you have this integrated it's strongly recommended to use the [secrets manager](https://www.npmjs.com/package/@ibm-cloud/secrets-manager) module with the [secrets manager service](https://cloud.ibm.com/catalog/services/secrets-manager).
To run this on your local machine create a file in the base directory of this project called `.env` and populate the following settings from the [Service Credentials](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-user-management#user-management-create-users) you have generated for the service.
```
MYSQL_PORT=xxxx
MYSQL_DATABASE=ibmclouddb
MYSQL_USER=xxxx
MYSQL_HOST=xxxx
MYSQL_PWD=xxxx
MYSQL_CA_BASE64=xxxx
```# build
```
docker build -t nodeapp .
```# local container run
```
podman run -p 8080:8080 --env-file .env nodeapp
```