No9 / ce-nodejs-mysql

sample application to connect node.js to a mysql instance using Code Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 module with the secrets manager service.

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 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

About

sample application to connect node.js to a mysql instance using Code Engine

License:MIT License


Languages

Language:JavaScript 76.1%Language:Dockerfile 18.9%Language:HTML 5.0%