doitintl / stenciljs-db-integration-testing

Testing a basic NodeJS server with StencilJS components and their interactions with GCP-managed databases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stenciljs-db-integration-testing

Within a new GCP project, following the automated deployment instructions below will create a basic NodeJS + Bootstrap 4 web server utilizing StencilJS components that interacts with a MySQL database on Cloud SQL. The web server demonstrates (1) writes to a MySQL DB hosted on Cloud SQL via a Contact form page, and (2) reads from that database via the Homepage.

GCP Project setup

Create a new GCP project, open up Cloud Shell, and run the following:

git clone https://github.com/doit-mattporter/stenciljs-db-integration-testing.git
# If desired, edit stenciljs-db-integration-testing/bootstrap/project_variables.sh
chmod +x stenciljs-db-integration-testing/bootstrap/project_setup.sh
./stenciljs-db-integration-testing/bootstrap/project_setup.sh

Compute Engine StencilJS VM

The web server listens at: http://<vm_public_ip>:8080

To manually restart nodemon, SSH onto the VM and run: nodemon /opt/stenciljs-db-integration-testing/server.js. Make sure nodemon is not already running.

About

Testing a basic NodeJS server with StencilJS components and their interactions with GCP-managed databases

License:MIT License


Languages

Language:Shell 39.5%Language:HTML 28.5%Language:JavaScript 27.6%Language:CSS 4.3%